[ncl-talk] Plot precipitation data without lat/lon coordinates
Andrew Kren - NOAA Affiliate
andrew.kren at noaa.gov
Wed May 25 12:17:31 MDT 2016
Mary,
I added your suggestions but my plots look a little confusing. I'm not sure
whether the region is plotted correctly since I can't tell where the U.S.
is or Alaska.
Any suggestions as to what may be going on? I attached my figure and my
code. Thanks.
On Fri, May 20, 2016 at 11:44 AM, Andrew Kren - NOAA Affiliate <
andrew.kren at noaa.gov> wrote:
> Thanks Mary. I also just noticed on their website that they have a
> C-program that will convert the netcdf data to binary with lat lon info.
> But this might also work. Thanks!
>
> On Fri, May 20, 2016 at 11:36 AM, Mary Haley <haley at ucar.edu> wrote:
>
>> Hi Andrew,
>>
>> Take a look at the first example on this page:
>>
>> http://www.ncl.ucar.edu/Applications/native.shtml
>>
>> As a first cut, I would download the native_1.ncl script, and add these
>> lines to read some data:
>>
>> f = addfile("nws_precip_ak_20160221.nc","r")
>> lat_corners = f->lat
>> lon_corners = f->lon
>> true_lat = f->true_lat
>> true_lon = f->true_lon
>>
>> and then change the following resource values as follows:
>>
>> ; The following resources are Required to plot this projection correctly
>>
>> res at mpProjection = "Stereographic" ; projection
>>
>> res at mpLimitMode = "Corners" ; method to zoom
>> res at mpLeftCornerLatF = lat(0)
>> res at mpLeftCornerLonF = lon(0)
>> res at mpRightCornerLatF = lat(2)
>> res at mpRightCornerLonF = lon(2)
>>
>> res at mpRelativeCenterLon = True ; set a center lon
>> res at mpCenterLonF = true_lon ; center lon
>> res at mpRelativeCenterLat = True ; set a center lat
>> res at mpCenterLatF = true_lat ; center lat
>> res at tfDoNDCOverlay = True
>>
>> The one thing I'm not sure about is whether the fact that your file says
>> "polar stereographic" is going to make a difference. You could also set
>> this to get a polar plot:
>>
>> res at mpEllipticalBoundary = True
>>
>> --Mary
>>
>>
>>
>> On Fri, May 20, 2016 at 10:43 AM, Andrew Kren - NOAA Affiliate <
>> andrew.kren at noaa.gov> wrote:
>>
>>> Dear ncl-talk,
>>>
>>> I am trying to plot precipitation data of radar and station data from
>>> the NWS. It is in netcdf form. When I read in the data, the array of
>>> precipitation is two dimensional as expected in (lat,lon). However, there
>>> are no lat/lon coordinate arrays in the netcdf file. It only gives me the 4
>>> corners of the lon / lat grid. I am sending the filedump of the netcdf file
>>> so you can see the format.
>>>
>>> Is there a way in ncl to plot the data on a map without the given
>>> coordinate arrays?
>>>
>>> Thanks,
>>>
>>> --
>>> Andrew Kren, PhD
>>> Research Scientist I, Global Observing Systems Analysis (GOSA) Group
>>> NOAA ESRL Global Systems Division (Rm 3C515)
>>> 325 Broadway, Boulder, CO 80305
>>> (303) 497-5418
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
> Andrew Kren, PhD
> Research Scientist I, Global Observing Systems Analysis (GOSA) Group
> NOAA ESRL Global Systems Division (Rm 3C515)
> 325 Broadway, Boulder, CO 80305
> (303) 497-5418
>
--
Andrew Kren, PhD
Research Scientist I, Global Observing Systems Analysis (GOSA) Group
NOAA ESRL Global Systems Division (Rm 3C515)
325 Broadway, Boulder, CO 80305
(303) 497-5418
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160525/391b5c0d/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_obs_precip_2016.ncl
Type: application/octet-stream
Size: 5933 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160525/391b5c0d/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp_ak_2016221.eps
Type: application/postscript
Size: 476193 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160525/391b5c0d/attachment-0001.eps
More information about the ncl-talk
mailing list