[ncl-talk] gsn_csm_vector_scalar_map_polar

Mauro Morichetti s1073755 at pm.univpm.it
Thu Apr 8 07:22:15 MDT 2021


Hi Adam,

thanks for your help.

> 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.


I solved setting the vfXArray/vfYArray resources.

thanks again

Regards

---------

Ph.D. Mauro Morichetti
Department of Industrial Engineering and Mathematical Science
Marche Polytechnic University, Ancona, Italy
m.morichetti at pm.univpm.it

> On 08Apr, 2021, at 05:26, Adam Phillips <asphilli at ucar.edu> wrote:
> 
> 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 <mailto: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 <mailto:m.morichetti at pm.univpm.it>
> <ERA5_500_T1.png>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu <mailto:ncl-talk at mailman.ucar.edu>
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk <https://mailman.ucar.edu/mailman/listinfo/ncl-talk>
> 
> -- 
> Adam Phillips 
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/ <http://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/20210408/ad411d7c/attachment.html>


More information about the ncl-talk mailing list