Changeset 1413 in lmdz_wrf


Ignore:
Timestamp:
Jan 17, 2017, 5:17:10 PM (8 years ago)
Author:
lfita
Message:

Adding `WRFghtrel': Relative altitude from surface from WRF

Location:
trunk/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diagnostics.py

    r1412 r1413  
    880880  'OMEGAw', 'RAINTOT',                                                               \
    881881  'rvors', 'td', 'turbulence', 'WRFgeop', 'WRFp', 'WRFrvors', 'ws', 'wds', 'wss',    \
    882   'WRFheight', 'WRFua', 'WRFva']
     882  'WRFheight', 'WRFheightrel', 'WRFua', 'WRFva']
    883883
    884884methods = ['accum', 'deaccum']
     
    17031703        ncvar.insert_variable(ncobj, 'zhgt', diagout, dnames, diagoutvd, newnc)
    17041704
     1705# WRFheightrel relative-height from WRF geopotential as WRFgeop(PH + PHB)/g-HGT 'WRFheightrel|PH@PHB@HGT
     1706    elif diag == 'WRFheightrel':
     1707        var0 = ncobj.variables[depvars[0]][:]
     1708        var1 = ncobj.variables[depvars[1]][:]
     1709        var2 = ncobj.variables[depvars[2]][:]
     1710
     1711        dimz = var0.shape[1]
     1712        diagout = np.zeros(tuple(var0.shape), dtype=np.float)
     1713        for iz in range(dimz):
     1714            diagout[:,iz,:,:] = var0[:,iz,:,:]+ var1[:,iz,:,:]/grav - var2
     1715
     1716        # Removing the nonChecking variable-dimensions from the initial list
     1717        varsadd = []
     1718        diagoutvd = list(dvnames)
     1719        for nonvd in NONchkvardims:
     1720            if gen.searchInlist(dvnames,nonvd): diagoutvd.remove(nonvd)
     1721            varsadd.append(nonvd)
     1722
     1723        ncvar.insert_variable(ncobj, 'zhgtrel', diagout, dnames, diagoutvd, newnc)
     1724
    17051725    else:
    17061726        print errormsg
  • trunk/tools/documentation/other/diagnostics.html

    r1356 r1413  
    5656         <TR><TD>wssturb</TD><TD>turbulence</TD><TD>wss</TD><TD>Wind speed turbulence (Taylor's wss*= < wss > - wss)</TD></TR>
    5757         <TR><TD>zg</TD><TD>WRFght</TD><TD>PH@PHB</TD><TD>Geopotential height from WRF</TD></TR>
     58         <TR><TD>zhgt</TD><TD>WRFheight</TD><TD>PH@PHB@WRFgeop</TD>Altitude from WRF</TD></TR>
     59         <TR><TD>zhgtrel</TD><TD>WRFheightrel</TD><TD>PH@PHB@HGT</TD>Relative altitude from surface from WRF</TD></TR>
    5860      </TABLE>
    5961    </DIV>
  • trunk/tools/variables_values.dat

    r1384 r1413  
    595595Z, z, z,  0., 100., z, -, Greens
    596596zhgt, zhgt, height,  0., 50000., altitude|from|surface, m, rainbow
     597zhgtrel, zhgtrel, height_relative,  0., 50000., altitude|relative|to|surface, m, rainbow
    597598zg, zg, geopotential_height, 0., 80000., geopotential|height, m2s-2, rainbow
    598599WRFgeop, zg, geopotential_height, 0., 80000., geopotential|height, m2s-2, rainbow
Note: See TracChangeset for help on using the changeset viewer.