[ncl-talk] Variable size
Dennis Shea
shea at ucar.edu
Thu Nov 25 10:21:45 MST 2021
UGRD_P0_L103_GLC0 (* lv_HTGL3*, ygrid_0, xgrid_0 )
level_type : Specified height level above ground (m)
--------------------------------------------------------------------------
Likely, * lv_HTGL3, *is a coordinate variable.
print( UGRD_P0_L103_GLC0*&lv_HTGL3 *)
will tell you the levels (m)
So ...
u2d = UGRD_P0_L103_GLC0 (0,:,: )
will yield a 2-dimensional variable corresponding to the 0-th dimension.
Let's say that * lv_HTGL3 *contained (/0, 2, 10/)
You could also use NCL's coordinate subscripting via the *{...}* syntax
u2d_0 = UGRD_P0_L103_GLC0 (*{0}*,:,: )
u2d_2 = UGRD_P0_L103_GLC0 (*{2}*,:,: )
u2d_10 = UGRD_P0_L103_GLC0 (*1**0}*,:,: )
On Thu, Nov 25, 2021 at 2:26 AM R. Lucas via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Dear NCL users
> i have 2 problems :
>
> 1) Is this varibable level looks like 10m above ground ?
> 2) This variable is 3d. How can I remove first dimension, somthing like
> (0,:,:)
> because I have a fatal error :
> fatal:["Execute.c":7925]:Number of subscripts on right-hand-side do not
> match
> number of dimensions of variable: (3), Subscripts used: (1)
>
> Thanks in advance.
> Rouss.
>
>
> float UGRD_P0_L103_GLC0 ( lv_HTGL3, ygrid_0, xgrid_0 )
> center : US National Weather Service - NCEP (WMC)
> production_status : Operational products
> long_name : U-component of wind
> units : m s-1
> _FillValue : 1e+20
> coordinates : gridlat_0 gridlon_0
> grid_type : Lambert Conformal can be secant or tangent,
> conical or bipolar
> parameter_discipline_and_category : Meteorological products,
> Momentum
> parameter_template_discipline_category_number : ( 0, 0, 2,
> 2 )
> level_type : Specified height level above ground (m)
> forecast_time : 0
> forecast_time_units : hours
> initial_time : 11/23/2021 (06:00)
>
> grib2 (WRF ARW)
> NCL 6.6.2
> UBUNTU 20.04
> _______________________________________________
> 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/5a551a41/attachment.html>
More information about the ncl-talk
mailing list