[gradsusr] plotting over 0E from netCDF
Cathy Smith (NOAA Affiliate)
cathy.smith at noaa.gov
Wed Jun 29 16:31:40 EDT 2016
Hi
Thanks for everyone who looked at this.
The problem WAS that the longitudes in the netCDF files I was reading
were not quite linear. They were off in the 4th decimal place for some
of the values (about 1 part in 576). The cause of that issue is
something we are looking into. Meanwhile, I should be able fix what I
was working on by creating my own set of longitudes to use when writing
out a file that are exactly linear. So, GrADS should then wrap. It is
good to have a logical solution to a perplexing problem.
Cathy
On 6/29/16 1:14 PM, Charles Seman - NOAA Federal wrote:
> Cathy,
>
> To elaborate a bit more on what Jim has said. I have a netCDF dataset
> with 480 longitudes: 0., 0.75, ... , 359.25 (uniform dlon) and am able
> to plot over Africa using the commands you gave below. It appears from
> your lon listing that the dlon are not uniform... For example, dlon =
> 0.7031252 for the first grid box, but dlon = 0.7031248 for the second
> grid box, and so on, and dlon = 0.7031 for the last grid box (dlon =
> 359.297-358.5939 = 0.7031), so it appears that GrADS doesn't "wrap"
> around 0/360. Don't know if this is the reason, but see if you can find
> a dataset with a uniform longitude spacing, and try with that.
>
> Chuck
>
> On 06/29/2016 01:49 PM, James T. Potemra wrote:
>> Kathy,
>>
>> I think the problem is you don't have a continuous grid across 0/360.
>> If your data were, for example, evenly spaced and you had a single value
>> at 360 then you could do 340 to 415. In this case you don't have any
>> longitudes greater than 360 defined. You might need to either regrid
>> or use an external tool (e.g., nco) to redefine longitude. Of course you
>> could also use "parea" to plot the western side and eastern sides
>> individually.
>>
>> Jim
>>
>> On 6/29/16 4:57 AM, Cathy Smith (NOAA Affiliate) wrote:
>>> Hi all
>>> This should be an easy question but I'm stumped. I'm trying to plot
>>> Africa (20W to 55E). the file I'm plotting from is netCDF and the
>>> longitudes are 0 to 359.27
>>>
>>> e.g.
>>> lon = 0, 0.7031252, 1.40625, 2.109376, 2.812501, 3.515626, 4.218751,
>>> 4.921877, 5.625002, 6.328127, 7.031252, 7.734378, 8.437503, 9.140628,
>>> 9.843754, 10.54688, 11.25, 11.95313, 12.65625, 13.35938, 14.0625,
>>> ......
>>> 354.3751, 355.0782, 355.7814, 356.4845, 357.1876, 357.8907, 358.5939,
>>> 359.297 ;
>>>
>>> my grads code has
>>>
>>> if( proj = 'africa' )
>>> 'set mproj latlon'
>>> 'set mpdset mres'
>>> 'set lat -40 45'
>>> 'set lon -20 55'
>>> 'set grid on'
>>> 'set frame on'
>>> 'set ylint 5'
>>> istate=0
>>> endif
>>>
>>> which plots the data from 0 to 55 only and not the data between 340 and 360.
>>>
>>> I also tried 340 to 415 instead of -20 to 55 and that plotted the data
>>> from 340 to 0 and not 0 to 55.
>>>
>>> What am I doing wrong? I know this can be done in GrADS.
>>>
>>> Thanks
>>> Cathy
>>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
--
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
http://www.esrl.noaa.gov/psd/people/cathy.smith/
Emails about data/webpages may get quicker responses from emailing
esrl.psd.data at noaa.gov
More information about the gradsusr
mailing list