[ncl-talk] gsn_csm_vector_scalar_map_polar

Adam Phillips asphilli at ucar.edu
Wed Apr 7 21:26:12 MDT 2021


Hi Mauro,
Please remember to always include ncl-talk on any response; that way others
can assist. You stated that you did not have any error messages, but in the
log file you sent me it ends like this:

(0) check_for_y_lat_coord: Warning: Data either does not contain
(0) a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units'
(0) attribute equal to one of the following values:
(0)    'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain
(0) a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units'
(0) attribute equal to one of the following values:
(0)    'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'

The first 10 lines from the log file above all refer to latitude/longitude
arrays not being correctly set, and are coming from one of these two lines:
  plot_wr1 =
gsn_csm_vector_scalar_map_polar(wks,u_avg(0,:,:),v_avg(0,:,:),geop_avg(0,:,:),res)
  plot_er1 =
gsn_csm_vector_scalar_map_polar(wks,u_regrid(0,:,:),v_regrid(0,:,:),z_regrid(0,:,:),res)
I would suggest that you use printVarSummary calls to examine the arrays
that are being passed to the plotting functions in those two lines. As the
vectors are being plotted correctly
in the 2nd plot, I would guess there's something amiss with your u_avg or
v_avg arrays, and you should compare the output in printVarSummary between
u_avg/v_avg and u_regrid/v_regrid to see if you see anything.
You are setting the 2-dimensional latitude and longitude arrays to the
sfXArray/sfYArray resources (for the geopotential height scalar arrasy),
but you are not setting vfXArray/vfYArray resources (for the wind component
arrays).
This may or may not be the issue.

One can also set the 2-dimensional lat/lon arrays as attributes lat2d/lon2d
attached to the arrays to be plotted. I do not know if you are doing that
or not.

Note that setting gsnAddCyclic to True or False will not fix this
particular issue.
Hope the above helps!
Adam



On Wed, Apr 7, 2021 at 7:43 AM Mauro Morichetti via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hi all,
>
> as the subject, I have a specific question about the function:
> gsn_csm_vector_scalar_map_polar.
>
> I am trying to plot a comparison between a WRF-Chem output and ERA5 data,
> for the geopotential height and the horizontal wind at 500 hPa, in arctic
> area.
>
> I have an issue plotting the wind vectors: in WRF-chem output (panel a -
> map attached) the wind doesn’t respect the domain as the values in the
> background. I had problem in the past with the gsnAddCyclic function, but
> here I could not understand why the function doesn’t interfere with the
> vectors.
>
> Attached the script.
>
> Anyone can Help? Thanks
>
> Regards
>
> ---------
>
> Ph.D. Mauro Morichetti
> Department of Industrial Engineering and Mathematical Science
> Marche Polytechnic University, Ancona, Italy
> m.morichetti at pm.univpm.it
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210407/164e20a6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ERA5_500_T1.png
Type: image/png
Size: 138246 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210407/164e20a6/attachment.png>


More information about the ncl-talk mailing list