[ncl-talk] Plot precipitation data without lat/lon coordinates
Mary Haley
haley at ucar.edu
Fri May 27 10:47:35 MDT 2016
Hi Andrew,
Sorry about the delay in response. I've been in meetings for the last few
days and only now catching up.
To help see where you are on the map, you can turn on special map tickmarks:
res at pmTickMarkDisplayMode = "Always"
Without your data, I can't really say for certain if you are doing things
correctly. But even with the data file, this is sometimes a guessing game.
If this data file came with documentation, then they may have included some
information about where to get the actual lat/lon coordinates of your
data. Sometimes they are provided on another file, or they might have a
way to calculate them. You can then use this information to plot your data
using real lat/lon coordinates, and compare it to your "native" plot.
--Mary
On Wed, May 25, 2016 at 12:17 PM, Andrew Kren - NOAA Affiliate <
andrew.kren at noaa.gov> wrote:
> 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/20160527/9017573f/attachment.html
More information about the ncl-talk
mailing list