<div dir="ltr">Thank you dennis I succeeded, thanks to your advice<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 25 nov. 2021 à 20:00, <<a href="mailto:ncl-talk-request@mailman.ucar.edu">ncl-talk-request@mailman.ucar.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send ncl-talk mailing list submissions to<br>
        <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank">ncl-talk-request@mailman.ucar.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:ncl-talk-owner@mailman.ucar.edu" target="_blank">ncl-talk-owner@mailman.ucar.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of ncl-talk digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Variable size (R. Lucas)<br>
   2. Re: Variable size (Dennis Shea)<br>
   3. Re: NCL function wrf_user_getvar (Israt Jahan)<br>
   4. Re: NCL function wrf_user_getvar (Dennis Shea)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 25 Nov 2021 10:26:02 +0100<br>
From: "R. Lucas" <<a href="mailto:rousslucas@gmail.com" target="_blank">rousslucas@gmail.com</a>><br>
To: <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
Subject: [ncl-talk] Variable size<br>
Message-ID:<br>
        <<a href="mailto:CAEcwEprvOmxHLTF55Ki4UsD85FgxNkgMbmTcpWNcdJvJHSpv5g@mail.gmail.com" target="_blank">CAEcwEprvOmxHLTF55Ki4UsD85FgxNkgMbmTcpWNcdJvJHSpv5g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear NCL users<br>
i have 2 problems :<br>
<br>
1) Is this varibable level looks like 10m above ground ?<br>
2) This variable is 3d. How can I remove first dimension, somthing like<br>
(0,:,:)<br>
because I have a fatal error :<br>
fatal:["Execute.c":7925]:Number of subscripts on right-hand-side do not<br>
match<br>
number of dimensions of variable: (3), Subscripts used: (1)<br>
<br>
Thanks in advance.<br>
Rouss.<br>
<br>
<br>
float UGRD_P0_L103_GLC0 ( lv_HTGL3, ygrid_0, xgrid_0 )<br>
         center :       US National Weather Service - NCEP (WMC)<br>
         production_status :    Operational products<br>
         long_name :    U-component of wind<br>
         units :        m s-1<br>
         _FillValue :   1e+20<br>
         coordinates :  gridlat_0 gridlon_0<br>
         grid_type :    Lambert Conformal can be secant or tangent, conical<br>
or bipolar<br>
         parameter_discipline_and_category :    Meteorological products,<br>
Momentum<br>
         parameter_template_discipline_category_number :        ( 0, 0, 2,<br>
2 )<br>
         level_type :   Specified height level above ground (m)<br>
         forecast_time :        0<br>
         forecast_time_units :  hours<br>
         initial_time : 11/23/2021 (06:00)<br>
<br>
grib2 (WRF ARW)<br>
NCL 6.6.2<br>
UBUNTU 20.04<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/bc5ab177/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/bc5ab177/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 25 Nov 2021 10:21:45 -0700<br>
From: Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>><br>
To: "R. Lucas" <<a href="mailto:rousslucas@gmail.com" target="_blank">rousslucas@gmail.com</a>><br>
Cc: ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>><br>
Subject: Re: [ncl-talk] Variable size<br>
Message-ID:<br>
        <CAOF1d_49Fz0Qb051ku3aOKBC=jxHksHpnnu==MywF=<a href="mailto:X9bUBCjg@mail.gmail.com" target="_blank">X9bUBCjg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
UGRD_P0_L103_GLC0 (* lv_HTGL3*, ygrid_0, xgrid_0 )<br>
level_type :   Specified height level above ground (m)<br>
--------------------------------------------------------------------------<br>
<br>
Likely, * lv_HTGL3, *is a coordinate variable.<br>
<br>
print( UGRD_P0_L103_GLC0*&lv_HTGL3 *)<br>
<br>
will tell you the levels (m)<br>
<br>
So ...<br>
<br>
    u2d = UGRD_P0_L103_GLC0 (0,:,: )<br>
<br>
will yield a 2-dimensional variable corresponding to the 0-th dimension.<br>
<br>
Let's say that * lv_HTGL3 *contained (/0, 2, 10/)<br>
<br>
You could also use NCL's coordinate subscripting via the *{...}* syntax<br>
<br>
u2d_0   = UGRD_P0_L103_GLC0 (*{0}*,:,: )<br>
u2d_2   = UGRD_P0_L103_GLC0 (*{2}*,:,: )<br>
u2d_10  = UGRD_P0_L103_GLC0 (*1**0}*,:,: )<br>
<br>
<br>
On Thu, Nov 25, 2021 at 2:26 AM R. Lucas via ncl-talk <<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
<br>
> Dear NCL users<br>
> i have 2 problems :<br>
><br>
> 1) Is this varibable level looks like 10m above ground ?<br>
> 2) This variable is 3d. How can I remove first dimension, somthing like<br>
> (0,:,:)<br>
> because I have a fatal error :<br>
> fatal:["Execute.c":7925]:Number of subscripts on right-hand-side do not<br>
> match<br>
> number of dimensions of variable: (3), Subscripts used: (1)<br>
><br>
> Thanks in advance.<br>
> Rouss.<br>
><br>
><br>
> float UGRD_P0_L103_GLC0 ( lv_HTGL3, ygrid_0, xgrid_0 )<br>
>          center :       US National Weather Service - NCEP (WMC)<br>
>          production_status :    Operational products<br>
>          long_name :    U-component of wind<br>
>          units :        m s-1<br>
>          _FillValue :   1e+20<br>
>          coordinates :  gridlat_0 gridlon_0<br>
>          grid_type :    Lambert Conformal can be secant or tangent,<br>
> conical or bipolar<br>
>          parameter_discipline_and_category :    Meteorological products,<br>
> Momentum<br>
>          parameter_template_discipline_category_number :        ( 0, 0, 2,<br>
> 2 )<br>
>          level_type :   Specified height level above ground (m)<br>
>          forecast_time :        0<br>
>          forecast_time_units :  hours<br>
>          initial_time : 11/23/2021 (06:00)<br>
><br>
> grib2 (WRF ARW)<br>
> NCL 6.6.2<br>
> UBUNTU 20.04<br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/5a551a41/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/5a551a41/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 25 Nov 2021 12:27:26 -0500<br>
From: Israt Jahan <<a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a>><br>
To: <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
Subject: Re: [ncl-talk] NCL function wrf_user_getvar<br>
Message-ID:<br>
        <<a href="mailto:CANJTbXaN4fN31Zp-DRLM_Od-ZRyUvkDJUOV868mYRxrnBDDhsQ@mail.gmail.com" target="_blank">CANJTbXaN4fN31Zp-DRLM_Od-ZRyUvkDJUOV868mYRxrnBDDhsQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
It would be much appreciated if someone could shed some light on this. Does<br>
wrf_user_getvar(NCDF_File,"z",0) measure z from ground level or sea level?<br>
I need to find temperature at 1000 m above ground level. I am doing the<br>
following:<br>
1. ht=wrf_user_getvar(NCDF_File,"z",0) ;<br>
where NCDF_File is a list of WRF netCDF files<br>
2. tk=wrf_user_getvar(NCDF_File,"tk",0)  ;get temperature in K<br>
2. temp_1km=wrf_user_interp_level(tk,ht,1000,0) ;<br>
get temperature at 1 km above ground level<br>
Is my approach correct?<br>
Best,<br>
Israt<br>
<br>
<br>
On Tue, Nov 16, 2021 at 4:26 PM Israt Jahan <<a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a>> wrote:<br>
<br>
> Dear NCL users,<br>
> I have a question about the NCL function "wrf_user_getvar". I see this<br>
> function can extract data from  WRF files and calculate the requested<br>
> diagnostic. One of the available diagnostics is "z/height" which is labeled<br>
> as the "full model height in m" in this site wrf_user_getvar (<a href="http://ucar.edu" rel="noreferrer" target="_blank">ucar.edu</a>)<br>
> <<a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml</a>>.<br>
> From WRF output files, I need to find temperature at 1000 m above ground<br>
> level. I am doing the following:<br>
> 1. ht=wrf_user_getvar(NCDF_File,"z",0) where NCDF_File is a list of WRF<br>
> netCDF files<br>
> 2. tk=wrf_user_getvar(NCDF_File,"tk",0)  to get temperature in K<br>
> 2. temp_1km=wrf_user_interp_level(tk,ht,1000,0) to get temperature at 1 km<br>
><br>
> My question is: is the diagnostic "z/height" that we get from<br>
> "wrf_user_getvar" measured from ground level or sea level?<br>
> If it is measured from sea level, what should I do to get z from ground<br>
> level?<br>
><br>
> Thank you so much.<br>
> Best,<br>
> Israt<br>
><br>
><br>
> --<br>
> Regards,<br>
> Israt Jahan<br>
> Graduate Assistant<br>
> Department of Civil and Environmental Engineering<br>
> School of Engineering | University of Connecticut<br>
> Email: <a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a><br>
><br>
-- <br>
Regards,<br>
Israt Jahan<br>
Graduate Assistant<br>
Department of Civil and Environmental Engineering<br>
School of Engineering | University of Connecticut<br>
Email: <a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/a7f2ce89/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/a7f2ce89/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 25 Nov 2021 11:01:09 -0700<br>
From: Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>><br>
To: Israt Jahan <<a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a>><br>
Cc: ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>><br>
Subject: Re: [ncl-talk] NCL function wrf_user_getvar<br>
Message-ID:<br>
        <CAOF1d_5xiRj_ck=V1mZney7Rkk2fiXu8Quzupkr5-=mYziJ=<a href="mailto:LA@mail.gmail.com" target="_blank">LA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
The **wrf_user* *functions and documentation  were created by WRF<br>
developers not NCL developers.<br>
NCL provides an interface to to provided derivation code [usually fortran].<br>
Hence, we can not support the underlying codes. Please contact WRF.<br>
========<br>
That said:<br>
<br>
 NCDF = addfile("<a href="http://wrfout_d02_2017-10-21_00_00_00.nc" rel="noreferrer" target="_blank">wrfout_d02_2017-10-21_00_00_00.nc</a>","r")<br>
 ht       = wrf_user_getvar(NCDF,"z",0)<br>
 printVarSummary(ht)                 ;   ?? [bottom_top | ..] x<br>
[south_north | ..] x [west_east | ..]??   height<br>
 tk       = wrf_user_getvar(NCDF,"tk",0)<br>
 printVarSummary(tk)                 ; ;   ?? [bottom_top | ..] x<br>
[south_north | ..] x [west_east | ..]??  temperature<br>
<br>
  J = 45     ; arbitrary latitude     index<br>
  I  = 50    ;                longitude<br>
<br>
  print( ht(:,J,I)+"   "+tk(:,J,I))     ; print all vertical values at a<br>
specified  location<br>
<br>
===<br>
*wrf_user_interp_level*<br>
<<a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_interp_level.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_interp_level.shtml</a>><br>
was introduced in the NCL 6.6 release. I do not have NCL 6.6 on my MAC<br>
<br>
 temp_1km=*wrf_user_interp_level*(tk,ht,1000,0)<br>
 printVarSummary( temp_1km )<br>
<br>
However, you could print the derived 1000m temperature at the J,K<br>
<br>
print( temp_1km(J,K) )<br>
<br>
This should indicate to you if the derived value is correct.<br>
<br>
===<br>
<br>
<br>
<br>
<br>
<br>
On Thu, Nov 25, 2021 at 10:27 AM Israt Jahan via ncl-talk <<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
<br>
><br>
> Hello,<br>
> It would be much appreciated if someone could shed some light on this.<br>
> Does wrf_user_getvar(NCDF_File,"z",0) measure z from ground level or sea<br>
> level?<br>
> I need to find temperature at 1000 m above ground level. I am doing the<br>
> following:<br>
> 1. ht=wrf_user_getvar(NCDF_File,"z",0) ;<br>
> where NCDF_File is a list of WRF netCDF files<br>
> 2. tk=wrf_user_getvar(NCDF_File,"tk",0)  ;get temperature in K<br>
> 2. temp_1km=wrf_user_interp_level(tk,ht,1000,0) ;<br>
> get temperature at 1 km above ground level<br>
> Is my approach correct?<br>
> Best,<br>
> Israt<br>
><br>
><br>
> On Tue, Nov 16, 2021 at 4:26 PM Israt Jahan <<a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a>> wrote:<br>
><br>
>> Dear NCL users,<br>
>> I have a question about the NCL function "wrf_user_getvar". I see this<br>
>> function can extract data from  WRF files and calculate the requested<br>
>> diagnostic. One of the available diagnostics is "z/height" which is labeled<br>
>> as the "full model height in m" in this site wrf_user_getvar (<a href="http://ucar.edu" rel="noreferrer" target="_blank">ucar.edu</a>)<br>
>> <<a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml</a>>.<br>
>> From WRF output files, I need to find temperature at 1000 m above ground<br>
>> level. I am doing the following:<br>
>> 1. ht=wrf_user_getvar(NCDF_File,"z",0) where NCDF_File is a list of WRF<br>
>> netCDF files<br>
>> 2. tk=wrf_user_getvar(NCDF_File,"tk",0)  to get temperature in K<br>
>> 2. temp_1km=wrf_user_interp_level(tk,ht,1000,0) to get temperature at 1<br>
>> km<br>
>><br>
>> My question is: is the diagnostic "z/height" that we get from<br>
>> "wrf_user_getvar" measured from ground level or sea level?<br>
>> If it is measured from sea level, what should I do to get z from ground<br>
>> level?<br>
>><br>
>> Thank you so much.<br>
>> Best,<br>
>> Israt<br>
>><br>
>><br>
>> --<br>
>> Regards,<br>
>> Israt Jahan<br>
>> Graduate Assistant<br>
>> Department of Civil and Environmental Engineering<br>
>> School of Engineering | University of Connecticut<br>
>> Email: <a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a><br>
>><br>
> --<br>
> Regards,<br>
> Israt Jahan<br>
> Graduate Assistant<br>
> Department of Civil and Environmental Engineering<br>
> School of Engineering | University of Connecticut<br>
> Email: <a href="mailto:israt.jahan@uconn.edu" target="_blank">israt.jahan@uconn.edu</a><br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/5ee16f93/attachment-0001.html" rel="noreferrer" target="_blank">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211125/5ee16f93/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
------------------------------<br>
<br>
End of ncl-talk Digest, Vol 216, Issue 16<br>
*****************************************<br>
</blockquote></div>