[ncl-talk] NCL function wrf_user_getvar

Dennis Shea shea at ucar.edu
Thu Nov 25 11:01:09 MST 2021


The **wrf_user* *functions and documentation  were created by WRF
developers not NCL developers.
NCL provides an interface to to provided derivation code [usually fortran].
Hence, we can not support the underlying codes. Please contact WRF.
========
That said:

 NCDF = addfile("wrfout_d02_2017-10-21_00_00_00.nc","r")
 ht       = wrf_user_getvar(NCDF,"z",0)
 printVarSummary(ht)                 ;   ?? [bottom_top | ..] x
[south_north | ..] x [west_east | ..]??   height
 tk       = wrf_user_getvar(NCDF,"tk",0)
 printVarSummary(tk)                 ; ;   ?? [bottom_top | ..] x
[south_north | ..] x [west_east | ..]??  temperature

  J = 45     ; arbitrary latitude     index
  I  = 50    ;                longitude

  print( ht(:,J,I)+"   "+tk(:,J,I))     ; print all vertical values at a
specified  location

===
*wrf_user_interp_level*
<https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_interp_level.shtml>
was introduced in the NCL 6.6 release. I do not have NCL 6.6 on my MAC

 temp_1km=*wrf_user_interp_level*(tk,ht,1000,0)
 printVarSummary( temp_1km )

However, you could print the derived 1000m temperature at the J,K

print( temp_1km(J,K) )

This should indicate to you if the derived value is correct.

===





On Thu, Nov 25, 2021 at 10:27 AM Israt Jahan via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

>
> Hello,
> It would be much appreciated if someone could shed some light on this.
> Does wrf_user_getvar(NCDF_File,"z",0) measure z from ground level or sea
> level?
> I need to find temperature at 1000 m above ground level. I am doing the
> following:
> 1. ht=wrf_user_getvar(NCDF_File,"z",0) ;
> where NCDF_File is a list of WRF netCDF files
> 2. tk=wrf_user_getvar(NCDF_File,"tk",0)  ;get temperature in K
> 2. temp_1km=wrf_user_interp_level(tk,ht,1000,0) ;
> get temperature at 1 km above ground level
> Is my approach correct?
> Best,
> Israt
>
>
> On Tue, Nov 16, 2021 at 4:26 PM Israt Jahan <israt.jahan at uconn.edu> wrote:
>
>> Dear NCL users,
>> I have a question about the NCL function "wrf_user_getvar". I see this
>> function can extract data from  WRF files and calculate the requested
>> diagnostic. One of the available diagnostics is "z/height" which is labeled
>> as the "full model height in m" in this site wrf_user_getvar (ucar.edu)
>> <https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml>.
>> From WRF output files, I need to find temperature at 1000 m above ground
>> level. I am doing the following:
>> 1. ht=wrf_user_getvar(NCDF_File,"z",0) where NCDF_File is a list of WRF
>> netCDF files
>> 2. tk=wrf_user_getvar(NCDF_File,"tk",0)  to get temperature in K
>> 2. temp_1km=wrf_user_interp_level(tk,ht,1000,0) to get temperature at 1
>> km
>>
>> My question is: is the diagnostic "z/height" that we get from
>> "wrf_user_getvar" measured from ground level or sea level?
>> If it is measured from sea level, what should I do to get z from ground
>> level?
>>
>> Thank you so much.
>> Best,
>> Israt
>>
>>
>> --
>> Regards,
>> Israt Jahan
>> Graduate Assistant
>> Department of Civil and Environmental Engineering
>> School of Engineering | University of Connecticut
>> Email: israt.jahan at uconn.edu
>>
> --
> Regards,
> Israt Jahan
> Graduate Assistant
> Department of Civil and Environmental Engineering
> School of Engineering | University of Connecticut
> Email: israt.jahan at uconn.edu
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/5ee16f93/attachment.html>


More information about the ncl-talk mailing list