[ncl-talk] Map Coming Up Short

Mary Haley haley at ucar.edu
Sat Jan 14 17:37:18 MST 2017


Barry,

It is hard to debug a problem like this, especially given the fact that you
are calling a Fortran code to get the ij indices, and we have no idea if
this code is returning the correct values.

It looks to me like your mpRight/LeftCorner settings are probably
incorrect, and that the values you are using for the lower right corner is
outside the range of your and this could be due to GET_IJ being incorrect.
Is it possible that GET_IJ is returning indices from 1 to N, and not 0 to
N-1? If so, then you may need to subtract 1 from the return values:

  x_start = i_loc-1
  y_start = j_loc-1

  . . .
  x_end = i_loc-1
  y_end = j_loc-1

If this still doesn't look correct, then I recommend plotting your data
without zooming in on it, and add the locations of  (lat_dom(0,0),lon(0,0))
and (lat_dom(njj,nii),lon_dom(njj,nii)) as markers on your plot (use
gsn_add_polymarker) to see if they fall within the range of your lat/lon
domain.

I've included a sample script that you can use as a start.  You should be
able to just change the name of the WRF output file and the
x_start/x_end/y_start/y_end values to match what you have in your own
script, and see if you get the expected results.

--Mary



On Sat, Jan 14, 2017 at 12:53 PM, Barry Lynn <barry.h.lynn at gmail.com> wrote:

> Hi:
>
> I have attached both the output and ncl program that reads WRF data and
> plots using gsn.
>
> It sets the grid as "Lambert Conformal" and reads the true latitudes and
> standard longitude from the WRF file.
>
> It also overlays data using an Opacity factor.
>
> Lastly, it uses "mask" to plot land vs ocean topography over which the
> snow forecast is overlaid.
>
> Thank you for your help.
>
> On Thu, Jan 12, 2017 at 7:15 PM, Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Barry,
>> I am guessing that the data is being drawn to the boundary of the data
>> coordinates of your overlay plot. You will not be able to get NCL to draw
>> anything outside of the data coordinates. Thus, short of interpolating your
>> data to a different grid, I believe your only choice would be to try
>> different map projections and map limits. This will only truly be done via
>> trial-and-error. You will want to set mpProjection along with various
>> mpLimitMode related resources. (You are already setting
>>  mpMinLatF/mpMaxLatF/mpMinLonF/mpMaxLonF with mpLimitMode = "LatLon"
>> (the default)., and plotting on a cylindrical equidistant projection
>> (again, the default).)
>>
>> The NCL examples website has numerous examples.
>> http://www.ncl.ucar.edu/Applications/, specifically see the Map
>> Projections examples. As you stated that your data is on a Lambert grid,
>> you might want to start with the Lambert Conformal examples.
>>
>> Hope that helps. If not, please respond to the ncl-talk email list.
>> Adam
>>
>> On Mon, Jan 9, 2017 at 9:17 AM, Barry Lynn <barry.h.lynn at gmail.com>
>> wrote:
>>
>>> Hi:
>>>
>>> I am excerpting a part of the WRF domain to make a snow accumulation
>>> plot.
>>>
>>>   snowh_rate_dom  = (/snowh_rate(y_start:y_end,x_start:x_end)/)
>>>
>>> Perhaps because the WRF domain (WPS) setting was Lambert, I get a blank
>>> area on the far right lower side (the overlay of snow does not extend all
>>> the way to the boundary).
>>>
>>> is there a way to force/cut-out the overlay so that it falls to the
>>> boundary?
>>>
>>> Barry
>>> --
>>> Barry H. Lynn, Ph.D
>>> Senior Lecturer,
>>> The Institute of the Earth Science,
>>> The Hebrew University of Jerusalem,
>>> Givat Ram, Jerusalem 91904, Israel
>>> Tel: 972 547 231 170
>>> Fax: (972)-25662581
>>>
>>> C.E.O, Weather It Is, LTD
>>> Weather and Climate Focus
>>> http://weather-it-is.com
>>> Jerusalem, Israel
>>> Local: 02 930 9525
>>> Cell: 054 7 231 170
>>> Int-IS: x972 2 930 9525
>>> US 914 432 3108 <(914)%20432-3108>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://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 <(303)%20497-1726>
>>
>> <http://www.cgd.ucar.edu/staff/asphilli>
>>
>
>
>
> --
> Barry H. Lynn, Ph.D
> Senior Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108 <(914)%20432-3108>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170114/214d2359/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_hgt.ncl
Type: application/octet-stream
Size: 2122 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170114/214d2359/attachment.obj 


More information about the ncl-talk mailing list