Changeset 500 in lmdz_wrf for trunk/tools/validation_sim.py
- Timestamp:
- Jun 15, 2015, 4:48:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/validation_sim.py
r498 r500 992 992 fname = 'adding_station_desc' 993 993 994 newvar = o bjfile.createVariable( 'station', 'c', ('StrLength'))994 newvar = onc.createVariable( 'station', 'c', ('StrLength')) 995 995 newvar[0:len(stdesc[0])] = stdesc[0] 996 996 … … 1005 1005 lonname = 'lon' 1006 1006 1007 newvar = o bjfile.createVariable( lonname, 'f4', ('nst'))1007 newvar = onc.createVariable( lonname, 'f4', ('nst')) 1008 1008 basicvardef(newvar, lonname, 'longitude', 'degrees_West' ) 1009 1009 newvar[:] = stdesc[1] … … 1017 1017 latname = 'lat' 1018 1018 1019 newvar = o bjfile.createVariable( latname, 'f4', ('nst'))1019 newvar = onc.createVariable( latname, 'f4', ('nst')) 1020 1020 basicvardef(newvar, lonname, 'latitude', 'degrees_North' ) 1021 1021 newvar[:] = stdesc[2] … … 1029 1029 heightname = 'height' 1030 1030 1031 newvar = o bjfile.createVariable( heightname, 'f4', ('nst'))1031 newvar = onc.createVariable( heightname, 'f4', ('nst')) 1032 1032 basicvardef(newvar, heightname, 'height above sea level', 'm' ) 1033 1033 newvar[:] = stdesc[3] … … 1293 1293 print ' [DIM]@[dimnsim]@[dimnobs]' 1294 1294 quit(-1) 1295 dims[dsecs[0]] = [dsecs[1], dsecs[2]] 1296 simdims[dsecs[0]] = dsecs[1] 1297 obsdims[dsecs[0]] = dsecs[2] 1298 1299 print ' ',dsecs[0],':',dsecs[1],',',dsecs[2] 1295 if dsecs[1] != 'None': 1296 dims[dsecs[0]] = [dsecs[1], dsecs[2]] 1297 simdims[dsecs[0]] = dsecs[1] 1298 obsdims[dsecs[0]] = dsecs[2] 1299 1300 print ' ',dsecs[0],':',dsecs[1],',',dsecs[2] 1300 1301 1301 1302 if opts.vardims is None: … … 1316 1317 print ' [DIM]@[vardimnsim]@[vardimnobs]' 1317 1318 quit(-1) 1318 vardims[dsecs[0]] = [dsecs[1], dsecs[2]] 1319 print ' ',dsecs[0],':',dsecs[1],',',dsecs[2] 1319 if dsecs[1] != 'None': 1320 vardims[dsecs[0]] = [dsecs[1], dsecs[2]] 1321 print ' ',dsecs[0],':',dsecs[1],',',dsecs[2] 1320 1322 1321 1323 if opts.obskind is None: … … 1551 1553 1552 1554 print main + ': found',Nexactt,'Temporal same values in simulation and observations' 1553 print ' ',exacttvalues1554 1555 1555 # Sim Coincident times 1556 1556 ## … … 1571 1571 print main + ': found',Ncoindt,'Simulation time-interval (within consecutive ' + \ 1572 1572 'observed times) coincident times between simulation and observations' 1573 print ' ',coindtvalues1574 1573 1575 1574 if Ncoindt == 0: … … 1840 1839 onewnc.sync() 1841 1840 1842 newvar = onewnc.createVariable('simtrj','i',('time','simtrj')) 1843 basicvardef(newvar, 'simtrj', 'coordinates [X,Y,Z,T] of the coincident trajectory ' +\ 1844 'in sim', obstunits) 1845 newvar[:] = trjsim.transpose() 1841 if trjsim is not None: 1842 newvar = onewnc.createVariable('simtrj','i',('time','simtrj')) 1843 basicvardef(newvar,'simtrj','coordinates [X,Y,Z,T] of the coincident ' + \ 1844 'trajectory in sim', obstunits) 1845 newvar[:] = trjsim.transpose() 1846 1846 1847 1847 # Adding three variables with the station location, longitude, latitude and height 1848 1848 if obskind == 'single-station': 1849 adding_station_desc(o bjfile,stationdesc)1849 adding_station_desc(onewnc,stationdesc) 1850 1850 1851 1851 # Global attributes
Note: See TracChangeset
for help on using the changeset viewer.