示例#1
0
文件: era2rdr.py 项目: basaks/PyAPS
#--------------------------------------------------------
[lon, lat, nx, ny, bufspc] = PyAPS.rd_rsc(dname)

#--------------------------------------------------------
#Get the min lat lon and max lat lon, roughly
#--------------------------------------------------------
minlon = lon.min()
maxlon = lon.max()
minlat = lat.min()
maxlat = lat.max()

#--------------------------------------------------------
#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
#--------------------------------------------------------
示例#2
0
文件: era2geo.py 项目: basaks/PyAPS
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)

##########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']