def main(): p = ArgumentParser(description='Lowtran 7 interface') p.add_argument('-z', '--obsalt', help='altitude of observer [km]', type=float, default=0.) p.add_argument('-a', '--zenang', help='zenith angle [deg] of sun or moon', nargs='+', type=float, default=[0, 60, 80]) p.add_argument('-s', '--short', help='shortest wavelength nm ', type=float, default=200) p.add_argument('-l', '--long', help='longest wavelength nm ', type=float, default=30000) p.add_argument('-step', help='wavelength step size cm^-1', type=float, default=20) p.add_argument('--model', help='0-6, see Card1 "model" reference. 5=subarctic winter', type=int, default=5) P = p.parse_args() c1 = { 'model': P.model, 'h1': P.obsalt, 'angle': P.zenang, # zenith angle of sun or moon 'wlshort': P.short, 'wllong': P.long, 'wlstep': P.step, } irr = lowtran.irradiance(c1) plotirrad(irr, c1, True) show()
def main(): p = ArgumentParser(description='Lowtran 7 interface') p.add_argument('-z', '--obsalt', help='altitude of observer [km]', type=float, default=0.) p.add_argument('-a', '--zenang', help='zenith angle [deg] of sun or moon', nargs='+', type=float, default=[0, 60, 80]) p.add_argument('-w', '--wavelen', help='wavelength range nm (start,stop)', type=float, nargs=2, default=(200, 25000)) p.add_argument('--model', help='0-6, see Card1 "model" reference. 5=subarctic winter', type=int, default=5) P = p.parse_args() c1 = { 'model': P.model, 'h1': P.obsalt, 'angle': P.zenang, # zenith angle of sun or moon 'wlnmlim': P.wavelen, } irr = lowtran.irradiance(c1) plotirrad(irr, c1, True) show()
#!/usr/bin/env python from matplotlib.pyplot import show # import lowtran from lowtran.plots import plotirrad if __name__=='__main__': from argparse import ArgumentParser p = ArgumentParser(description='Lowtran 7 interface') p.add_argument('-z','--obsalt',help='altitude of observer [km]',type=float,default=0.) p.add_argument('-a','--zenang',help='zenith angle [deg] can be single value or list of values',type=float,default=0.) p.add_argument('-w','--wavelen',help='wavelength range nm (start,stop)',type=float,nargs=2,default=(200,15000)) p.add_argument('--model',help='0-6, see Card1 "model" reference. 5=subarctic winter',type=int,default=5) p=p.parse_args() c1={'model':p.model, 'itype':3, # 3: observer to space 'iemsct':3 # 3: solar irradiance } TR = lowtran.golowtran(p.obsalt,p.zenang,p.wavelen,c1) plotirrad(TR,True,c1) show()
lowtran.nm2lt7(200, 2500, 20) c1 = { 'model': 6, 'h1': 0, 'angle': [0, 30, 60], 'wlshort': 300, 'wllong': 2600, 'wlstep': 5, } TR = lowtran.transmittance(c1) lp.plottrans(TR, c1) TR = lowtran.radiance(c1) lp.plotradiance(TR, c1) TR = lowtran.irradiance(c1) lp.plotirrad(TR, c1) s = SixS() s.geometry.solar_z = sza s.geometry.solar_a = 0 s.geometry.view_z = vza s.geometry.view_a = azi s.aero_profile = AeroProfile.PredefinedType(AeroProfile.Maritime) parameter = 'apparent_radiance' parameter = 'direct_solar_irradiance' params = [ 'transmittance_no2.total', 'total_gaseous_transmittance', 'apparent_radiance', 'direct_solar_irradiance', 'diffuse_solar_irradiance' ] ss = []
p.add_argument('-a', '--zenang', help='zenith angle [deg] of sun or moon', nargs='+', type=float, default=[0, 60, 80]) p.add_argument('-w', '--wavelen', help='wavelength range nm (start,stop)', type=float, nargs=2, default=(200, 25000)) p.add_argument('--model', help='0-6, see Card1 "model" reference. 5=subarctic winter', type=int, default=5) p = p.parse_args() c1 = { 'model': p.model, 'h1': p.obsalt, 'angle': p.zenang, # zenith angle of sun or moon 'wlnmlim': p.wavelen, } I = lowtran.irradiance(c1) plotirrad(I, c1, True) show()