[ncl-talk] Vertical Integration of cloud water mixing ratio from WRF out file
Barry Lynn
barry.h.lynn at gmail.com
Mon Dec 5 07:57:28 MST 2022
Hi:
>From what you wrote, that would be precipitable water.
You can zero out the levels you don't want to keep, and then calculate pw.
https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml
The difficulty is zeroing it out and then writing it back to the wrf
output.
The easiest thing to do would be to request the function for pw and then
modify it the way you want, and then call it.
However, I have calculated precipitable water before and maybe able to find
it for you.
I will try to take a look.
Barry
On Mon, Dec 5, 2022 at 3:46 PM Barry Lynn <barry.h.lynn at gmail.com> wrote:
> Hello Anie:
>
> Could you please describe, in a bit more detail, what you are trying to do.
>
> Barry
>
> On Mon, Dec 5, 2022 at 3:12 PM Anie K Lal via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> I was able to find another method for vertical integration using
>> "vibeta."
>>
>>
>> ------------------------------------------------------------------------------------------
>> filename =
>> "/media/hp/Expansion/WRF/2019_simulation/EXP02/wrfout_d02.nc"
>> f1 = addfile(filename,"r")
>>
>> q1 = f1->QCLOUD(74,0:8,:,:)*1000
>> psfc = wrf_user_getvar(f1,"PSFC",74)*0.01 ;
>> surface pressure, turn to hPa (; unit of PSFC in WRF is Pa)
>> plev = wrf_user_getvar(f1,"pressure",74) ; air
>> pressure hPa (time,level,lat,lon)
>> plev1 = plev(0:8,:,:)
>>
>> printVarSummary(plev1)
>>
>> copy_VarCoords(plev1, q1)
>>
>> printVarSummary(q1)
>>
>> ptop = 913.9985
>> pbot = 999.4952
>>
>> q2 =
>>
>> vibeta(plev1(south_north|:,west_east|:,bottom_top|:),q1(south_north|:,west_east|:,bottom_top|:),2,psfc,pbot,ptop)
>>
>> printVarSummary(q2)
>>
>> ------------------------------------------------------------------------------------------------
>>
>> I am not sure whether this is the right way to find the vertically
>> integrated value of mixing ratio. Is this method correct?
>>
>> Kindly advise.
>>
>> Thank you
>> Anie
>>
>>
>>
>>
>>
>> -------- Original Message --------
>> Subject: Vertical Integration of cloud water mixing ratio from WRF out
>> file
>> Date: 05.12.2022 15:22
>> From: Anie K Lal <Anieklal at cas.iitd.ac.in>
>> To: ncl-talk at mailman.ucar.edu
>>
>> 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.
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> --
>
> Barry H. Lynn, Ph.D
> Senior Scientist, Lecturer,
> The Institute of Earth Sciences,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> Weather It Is, LTD
> Weather and Climate Focus
> https://weather-it-is.com <http://weather-it-is.com>
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
>
--
Barry H. Lynn, Ph.D
Senior Scientist, Lecturer,
The Institute of Earth Sciences,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581
Weather It Is, LTD
Weather and Climate Focus
https://weather-it-is.com <http://weather-it-is.com>
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221205/64f05171/attachment.htm>
More information about the ncl-talk
mailing list