pres = P0 * (1 + L / T0 * (z * 1e3 - z0))**( -g0 * M / R / L ) # unit: hPa aodpro = np.ones(len(pres)) * 1e-4 aodpro[1] = iaod / ialt for idp in dpval: # expname = 'AAI_sens_HG_mphy_4' expname = 'AAI_sens_HG_geom_4' ######## Test HG: all test outputname = rundisamar(expname = expname, year=2017, month=1, day=27, cfgtemplate = 'Config_AAI_354_388_100hPa_SA_HG.in',\ simulationOnly = 0, Gaussdp = idp, atminterval = pres, aerlev = 0, ps = Ps_avg, SZA = isza , SAA = isaa, \ VZA = ivza, VAA = ivaa, wvl = [354., 388.], AOD = aodpro, As = list(As_avg), \ aerosolType = 'HG', ANG = np.ones(len(pres))*iAng, SSA = np.ones(len(pres))*issa, g = np.ones(len(pres))*iasy) src = '/AAI_sens_saa-%1.2f_Ang-%1.2f_asy-%1.2f_sza-%03i_saa-%03i_vza-%03i_vaa-%03i_aod-%1.2f_alh-%1.2f_alt-%1.2f_dp-%02i.h5' \ %(issa,iAng,iasy,isza,isaa,ivza,ivaa,iaod,ialh,ialt,idp) print src if not os.path.exists(nobackupdir + expname): os.makedirs(nobackupdir + expname) os.rename( outputdir + expname + '/disamar.h5', outputdir + expname + src)
DSMpres = P0 * (1+L/T0 * (z*1e3-z0)) ** (-g0*M/R/L) # unit: hPa DSMpro = np.array([1.0e-4]+[aodms[ip] / ialt]+[1.0e-4]) aerlev = np.where(DSMpro == DSMpro.max())[0][0]+1 if aerlev == 1: aerlev = 2 t2 = time.time() for expname in [bimodal]: outputname = rundisamar(expname = expname, year=iyear, month=imon, day=iday, cfgtemplate = 'Config_AAI_354_388_100hPa_SA_Mie.in',\ simulationOnly = 0, Gaussdp = 20, atminterval = DSMpres, aerlev = aerlev, ps = 1013., SZA = sza[ip], SAA = saa[ip], \ VZA = vza[ip], VAA = vaa[ip], wvl = [354., 388.], AOD = DSMpro, As = list(alb[ip,:]), \ aerosolType = 'Mie', expcoef = expname+'.dat') src = '/AAI_sim_Mie_lat_%2.2f_lon_%3.2f.h5' % (lat[ip], lon[ip]) print src testname = '/full_alh-%1.2f_alt-%1.2f_ni-%1.2f' % (ialh, ialt,ifactor) if not os.path.exists(nobackupdir + expname + testname): os.makedirs(nobackupdir + expname + testname) os.rename(outputdir + expname + '/disamar.h5', outputdir + expname + src) if os.path.isfile(nobackupdir + expname + testname + src):
os.symlink( expindir + expfilename + '.in', exedir + 'Config.in') os.system(exedir + "createExpCoefFile.exe") shutil.copy2( expoutdir + expfilename + '.dat', expcoefdir + expfilename + '.dat') #""" #**** run DISAMAR #""" outputname = rundisamar(expname = expname, year = 2017, month=1, day=27, cfgtemplate = 'Config_AAI_354_388_100hPa_SA_Mie.in',\ simulationOnly = 0, Gaussdp = idp, atminterval = pres, aerlev = 0, ps = Ps_avg, SZA = isza, SAA = isaa, \ VZA = ivza, VAA = ivaa, wvl = [354., 388.], AOD = aodpro, As = list(As_avg), \ aerosolType = 'Mie', expcoef = expfilename+'.dat') src = '/AAI_sens_rg-%1.2f_re-%1.4f_im-%1.4f_sza-%03i_saa-%03i_vza-%03i_vaa-%03i_aod-%1.2f_alh-%1.2f_alt-%1.2f_dp-%02i.h5' \ %(irg,ire,iim,isza,isaa,ivza,ivaa,iaod,ialh,ialt,idp) print src if not os.path.exists(nobackupdir + expname): os.makedirs(nobackupdir + expname) os.rename( outputdir + expname + '/disamar.h5',