Changeset 340 in lmdz_wrf for trunk/tools/validation_sim.py
- Timestamp:
- Mar 1, 2015, 11:12:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/validation_sim.py
r339 r340 3 3 ## e.g. sfcEneAvigon # validation_sim.py -d X@west_east@None,Y@south_north@None,T@Time@time -D X@XLONG@longitude,Y@XLAT@latitude,T@time@time -k single-station -l 4.878773,43.915876,12. -o /home/lluis/DATA/obs/HyMeX/IOP15/sfcEnergyBalance_Avignon/OBSnetcdf.nc -s /home/lluis/PY/wrfout_d01_2012-10-18_00:00:00.tests -v HFX@H,LH@LE,GRDFLX@G 4 4 ## e.g. AIREP # validation_sim.py -d X@west_east@lon2D,Y@south_north@lat2D,Z@bottom_top@z2D,T@Time@time -D X@XLONG@longitude,Y@XLAT@latitude,Z@WRFz@alti,T@time@time -k trajectory -o /home/lluis/DATA/obs/HyMeX/IOP15/AIREP/2012/10/AIREP_121018.nc -s /home/lluis/PY/wrfout_d01_2012-10-18_00:00:00.tests -v WRFt@t,WRFtd@td,WRFws@u,WRFwd@dd 5 ## e.g. ATRCore # validation_sim.py -d X@west_east@lon2D,Y@south_north@lat2D,Z@bottom_top@z2D,T@Time@CFtime -D X@XLONG@longitude,Y@XLAT@latitude,Z@WRFz@altitude,T@time@time -k trajectory -o /home/lluis/DATA/obs/HyMeX/IOP15/ATRCore/V3/ATR_1Hz-HYMEXBDD-SOP1-v3_20121018_as120051.nc -s /home/lluis/PY/wrfout_d01_2012-10-18_00:00:00.tests -v WRF T@air_temperature@subc@273.156 ## e.g. BAMED # validation_sim.py -d X@west_east@lon2D,Y@south_north@lat2D,Z@bottom_top@z2D,T@Time@CFtime -D X@XLONG@longitude,Y@XLAT@latitude,Z@WRFz@altitude,T@time@time -k trajectory -o /home/lluis/DATA/obs/HyMeX/IOP15/BAMED/BAMED_SOP1_B12_TOT5.nc -s /home/lluis/PY/wrfout_d01_2012-10-18_00:00:00.tests -v WRF T@tas_north5 ## e.g. ATRCore # validation_sim.py -d X@west_east@lon2D,Y@south_north@lat2D,Z@bottom_top@z2D,T@Time@CFtime -D X@XLONG@longitude,Y@XLAT@latitude,Z@WRFz@altitude,T@time@time -k trajectory -o /home/lluis/DATA/obs/HyMeX/IOP15/ATRCore/V3/ATR_1Hz-HYMEXBDD-SOP1-v3_20121018_as120051.nc -s /home/lluis/PY/wrfout_d01_2012-10-18_00:00:00.tests -v WRFt@air_temperature@subc@273.15,WRFp@air_pressure,WRFrh@relative_humidity,WRFrh@relative_humidity_Rosemount,WRFwd@wind_from_direction,WRFws@wind_speed 6 ## e.g. BAMED # validation_sim.py -d X@west_east@lon2D,Y@south_north@lat2D,Z@bottom_top@z2D,T@Time@CFtime -D X@XLONG@longitude,Y@XLAT@latitude,Z@WRFz@altitude,T@time@time -k trajectory -o /home/lluis/DATA/obs/HyMeX/IOP15/BAMED/BAMED_SOP1_B12_TOT5.nc -s /home/lluis/PY/wrfout_d01_2012-10-18_00:00:00.tests -v WRFt@tas_north,WRFp@pressure,WRFrh@hus,U@uas,V@vas 7 7 8 8 import numpy as np … … 796 796 quit(-1) 797 797 else: 798 simdims = {} 799 obsdims = {} 798 800 print main +': couple of dimensions _______' 799 801 dims = {} … … 807 809 quit(-1) 808 810 dims[dsecs[0]] = [dsecs[1], dsecs[2]] 811 simdims[dsecs[0]] = dsecs[1] 812 obsdims[dsecs[0]] = dsecs[2] 813 809 814 print ' ',dsecs[0],':',dsecs[1],',',dsecs[2] 810 815 … … 1104 1109 for ivar in range(Nvars): 1105 1110 simobsvalues = [] 1106 # Values spatially around the point (+/- [Ngrid] points)1107 simobsSvalues = []1108 1111 1109 1112 varsimobs = valvars[ivar][0] + '_' + valvars[ivar][1] 1113 print ' ' + varsimobs + '... .. .' 1110 1114 1111 1115 if not oobs.variables.has_key(valvars[ivar][1]): … … 1125 1129 else: 1126 1130 ovsim = osim.variables[valvars[ivar][0]] 1131 1132 for idn in ovsim.dimensions: 1133 if not searchInlist(simdims.values(),idn): 1134 print errormsg 1135 print ' ' + main + ": dimension '" + idn + "' of variable '" + \ 1136 valvars[ivar][0] + "' not provided as reference coordinate [X,Y,Z,T] !!" 1137 quit(-1) 1127 1138 1128 1139 ovobs = oobs.variables[valvars[ivar][1]] … … 1190 1201 sliceS.append(slice(0,maxy-miny)) 1191 1202 sliceS.append(slice(0,maxx-minx)) 1192 1203 1193 1204 simobsSvalues[tuple(sliceS)] = slicevar 1194 1205 if ivar == 0:
Note: See TracChangeset
for help on using the changeset viewer.