#-------------------------------------------------------- #Read data in ERA-I GRIB file #-------------------------------------------------------- [lvls, latlist, lonlist, gph, tmp, vpr] = PyAPS.get_era( fname, minlat - bufspc, maxlat + bufspc, minlon - bufspc, maxlon + bufspc, cdic) #-------------------------------------------------------- #Compute ERA-I grid points coordinates into radar coordinates #-------------------------------------------------------- [xi, yi] = PyAPS.glob2rdr(nx, ny, lat, lon, latlist, lonlist) #-------------------------------------------------------- #Interpolate data in height #-------------------------------------------------------- [Pi, Ti, Vi] = PyAPS.intP2H(lvls, hgt, gph, tmp, vpr, cdic) #-------------------------------------------------------- #Computing Delay functions #-------------------------------------------------------- [DDry, DWet] = PyAPS.PTV2del(Pi, Ti, Vi, hgt, cdic) Delfn = DDry+DWet #-------------------------------------------------------- #Building the interpolation function #-------------------------------------------------------- fnc = PyAPS.make3dintp(Delfn, xi, yi, hgt, hgtscale) #-------------------------------------------------------- #Writing to File #--------------------------------------------------------
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) ##########Interpolating to heights from Pressure levels########### [Presi,Tempi,Vpri] = PyAPS.intP2H(lvls,hgt,gph,tmp,vpr,cdict) ###########Computing the delay function ############################### [DDry,DWet] = PyAPS.PTV2del(Presi,Tempi,Vpri,hgt,cdict) Delfn = DDry+DWet del DDry del DWet #########Reading in DEM and writing output ################# #######################make_geomap.f90####################### fnc = PyAPS.make3dintp(Delfn,lonlist,latlist,hgt,hgtscale) print 'PROGRESS: INTERPOLATION FUNCTION READY' minAltp = cdict['minAltP'] laty = np.linspace(lat[1], lat[0], ny) lonx = np.linspace(lon[0], lon[1], nx)