Changeset 1692 in lmdz_wrf


Ignore:
Timestamp:
Dec 6, 2017, 3:52:49 PM (7 years ago)
Author:
lfita
Message:

Adding station's height from file

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/config_get_stations.WRF.py

    r1688 r1692  
    4444  'T': ['WRFtime']}
    4545
    46 # dim Variables
     46# dim Variables ('H' to determine station height from file)
    4747dimvariables = {'west_east': 'XLONG', 'south_north': 'XLAT', 'bottom_top': 'ZNU',    \
    4848  'Time': 'WRFtime', 'west_east_stag': 'XLONG_U', 'south_north_stag': 'XLAT_U',      \
    49   'bottom_top_stag': 'ZNW'}
     49  'bottom_top_stag': 'ZNW', 'H': 'HGT'}
    5050
    5151# SFC Variables
    52 sfcvariables = {'tas':'T2', 'uas':'WRFuas', 'vas':'WRFvas', 'huss':'Q2', 'ps':'PSFC',\
    53   'zhgt':'HGT'}
     52sfcvariables = {'tas':'T2', 'uas':'WRFuas', 'vas':'WRFvas', 'huss':'Q2', 'ps':'PSFC'}
    5453sfcrefvar = 'tas'
    5554
  • trunk/tools/get_stations.py

    r1691 r1692  
    280280
    281281# surface stations
    282 if stcstatfile != 'None':
     282if sfcstatfile != 'None':
    283283    osfcstatf = open(sfcstatfile, 'r')
    284284
     
    315315
    316316# sounding stations
    317 if stcstatfile != 'None':
     317if sndstatfile != 'None':
    318318    osndstatf = open(sndstatfile, 'r')
    319319
     
    479479            ojvar = onewnc.variables['ipoint']
    480480            ojvar[:] = minji[1]
     481            ohvar = onewnc.variables['fheight']
     482            ohvar[:] = dimvarvalues[dimvariables['H']][minji[0],minji[1]]
    481483            onewnc.sync()
    482484
     
    616618            ojvar = onewnc.variables['ipoint']
    617619            ojvar[:] = minji[1]
     620            ohvar = onewnc.variables['fheight']
     621            ohvar[:] = dimvarvalues[dimvariables['H']][minji[0],minji[1]]
    618622            onewnc.sync()
    619623
Note: See TracChangeset for help on using the changeset viewer.