[gradsusr] plotting over 0E from netCDF

Charles Seman - NOAA Federal charles.seman at noaa.gov
Wed Jun 29 15:14:36 EDT 2016


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
>

-- 

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
  Charles Seman                                Charles.Seman at noaa.gov
  U.S. Department of Commerce / NOAA / OAR
  Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
  201 Forrestal Road                              fax: (609) 987-5063
  Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect any
official or unofficial position of the United States Federal Government,
the United States Department of Commerce, or NOAA."


More information about the gradsusr mailing list