Changeset 1761 in lmdz_wrf


Ignore:
Timestamp:
Jan 19, 2018, 11:30:34 AM (7 years ago)
Author:
lfita
Message:

Final working version of cape from AFWA

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diagnostics.py

    r1759 r1761  
    6666parser.add_option("-f", "--netCDF_file", dest="ncfile", help="file to use", metavar="FILE")
    6767parser.add_option("-d", "--dimensions", dest="dimns", 
    68   help="[dimtn]@[dtvn],[dimzn]@[dzvn],[...,[dimxn]@[dxvn]], ',' list with the couples [dimDn]@[dDvn], [dimDn], name of the dimension D and name of the variable [dDvn] with the values of the dimension ('WRFtime', for WRF time copmutation)" + comboinf,
     68  help="[dimtn]@[dtvn],[dimzn]@[dzvn],[...,[dimxn]@[dxvn]], ',' list with the couples [dimDn]@[dDvn], [dimDn], name of the dimension D and name of the variable [dDvn] with the values of the dimension ('WRFtime', for WRF time copmutation). NOTE: same order as in file!!!!" + comboinf,
    6969  metavar="LABELS")
    7070parser.add_option("-v", "--variables", dest="varns",
     
    698698        dz = WRFgeop.shape[1]
    699699        # de-staggering
    700         var3 = 0.5*(WRFgeop[:,0:dz-1,:,:]+WRFgeop[:,1:dz,:,:])*9.81
     700        var3 = 0.5*(WRFgeop[:,0:dz-1,:,:]+WRFgeop[:,1:dz,:,:])
    701701        var4 = ncobj.variables[depvars[4]][0,:,:]
    702702
  • trunk/tools/module_ForDiagnostics.f90

    r1759 r1761  
    862862  END FUNCTION TLCL
    863863
    864   FUNCTION var_cape_afwa1D(nz, tk, rhv, p, hgtv, sfc, cape, cin, zlfc, plfc, lidx, parcel) RESULT (ostat)
     864  FUNCTION var_cape_afwa1D(nz, tk, rhv, p, hgt, sfc, cape, cin, zlfc, plfc, lidx, parcel) RESULT (ostat)
    865865! Function to compute cape on a 1D column following implementation in phys/module_diag_afwa.F
    866866
     
    868868
    869869    INTEGER, INTENT(in)                                  :: nz, sfc
    870     REAL(r_k), DIMENSION(nz), INTENT(in)                 :: tk, rhv, p, hgtv
     870    REAL(r_k), DIMENSION(nz), INTENT(in)                 :: tk, rhv, p, hgt
    871871    REAL(r_k), INTENT(out)                               :: cape, cin, zlfc, plfc, lidx
    872872    INTEGER                                              :: ostat
     
    876876    !~ Derived profile variables
    877877    !  -------------------------
    878     REAL(r_k), DIMENSION(nz)                             :: rh, hgt, ws, w, dTvK, buoy
     878    REAL(r_k), DIMENSION(nz)                             :: rh, ws, w, dTvK, buoy
    879879    REAL(r_k)                                            :: tlclK, plcl, nbuoy, pbuoy
    880880 
     
    915915! rh: Relative Humidity profile [%]
    916916! p: Pressure profile [Pa]
    917 ! hgtv: Height profile [m]
    918 ! hgt: Height profile [gpm]
     917! hgt: Geopotential height profile [gpm]
    919918! cape: CAPE [Jkg-1]
    920919! cin: CIN [Jkg-1]
     
    982981    !  --------------------
    983982    rh = rhv*100.
    984     hgt = hgtv*g
    985983    ostat = 0
    986984    CAPE = zeroRK
Note: See TracChangeset for help on using the changeset viewer.