[ncl-talk] Vertical Integration of cloud water mixing ratio from WRF out file

Anie K Lal Anieklal at cas.iitd.ac.in
Mon Dec 5 02:52:24 MST 2022


Hi all,

I want to calculate the liquid water path by vertically integrating 
cloud water mixing ratio for the first 9 levels from surface.

Cloud water mixing ratio= QCLOUD(Time, bottom_top, south_north, 
west_east)

This is the script I tried:
------------------------------------------------------------------------------
   filename = "/WRF/2019/EXP02/wrfout_d02.nc"
   f1        = addfile(filename,"r")

   q1 = f1->QCLOUD(74,0:8,:,:)
   P  = f1->P(74,0:8,:,:)
   T1  = f1->T(74,0:8,:,:)
   Pb = f1->PB(74,0:8,:,:)
   P  = (P+Pb)   ;Total pressure in Pa

   Ptop  =min(P)
   Psurf =max(P)

   dp   = dpres_plevel_Wrap(P, Psurf, Ptop, 0)  ; dp(time,plev,lat,lon)

   printVarSummary(dp)
--------------------------------------------------------------------------------

I am getting the error:
"fatal:Number of dimensions in parameter (0) of (dpres_plevel_Wrap) is 
(3), (1) dimensions were expected"

I understand that 'P' should have only one dimension, but how to solve 
this in my case where P is three dimensional.

Looking forward to any kind of help.

Thank you.


More information about the ncl-talk mailing list