sys.exit(1) #outfile oname = sys.argv[3] #Wavelength, conversion cm to m wvl = float(sys.argv[4])/100.0 #Incidence angle, conversion deg to rad inc = float(sys.argv[5])*math.pi/180.0 #-------------------------------------------------------- # Initialize Constants #-------------------------------------------------------- # Reading atmo constants dictionary cdic = PyAPS.initconst() cdic['wvl'] = wvl cdic['inc'] = inc #Values for interpolation minAlt = cdic['minAlt'] maxAlt = cdic['maxAlt'] nhgt = cdic['nhgt'] minAltp = cdic['minAltP'] hgt = np.linspace(minAlt, maxAlt, nhgt) # Scaling for interpolation # For rdr geom grid is about 200*200 pixels # nght gives the spacing #hgtscale = 0.5 for nhgt=151 hgtscale = ((maxAlt-minAlt)/nhgt)/200
if not os.path.isfile(dname+'.rsc'): print 'DEM RSC File not found: ', dname sys.exit(1) oname = sys.argv[3] wvl = float(sys.argv[4])/100.0 #Conversion from cm to meters inc = float(sys.argv[5])*math.pi/180.0 #Conversion to radians ####################Completed parsing inputs #####Reading DEM.rsc file ############################ [lon, lat, nx, ny, bufspc] = PyAPS.geo_rsc(dname) ##############Completed reading DEM.rsc file############## cdict=PyAPS.initconst() cdict['wvl'] = wvl cdict['inc'] = inc plotflag = 'n' hgt = np.linspace(cdict['minAlt'], cdict['maxAlt'], cdict['nhgt']) #Heights for interpolation # Scaling for interpolation # For geo geom grid is about 0.703*0.703 # nght gives the spacing #hgtscale = 142.25 for nhgt=151 hgtscale=((cdict['maxAlt']-cdict['minAlt'])/cdict['nhgt'])/0.703 #################Reading in Weather Data from NARR file############# [lvls,latlist,lonlist,gph,tmp,vpr] = PyAPS.get_era(fname,lat[0]-bufspc,lat[1]+bufspc,lon[0]-bufspc,lon[1]+bufspc,cdict)