[gradsusr] handling overlapping longitude values

P. R.M. romero619 at hotmail.com
Fri Oct 15 00:06:15 EDT 2010


I have scripts that need to handle data requests from both arbitrary control files and also arbitrary longitude values in the range of -180 to 180 degrees longitude; some of the control files have longitude ranges from 0-360 degrees, while the others are in the -180 to 180 range.

when I load a control file that is in the 0-360 longitude range, and then set arbitrary longitude values in the -180=>180 range that completely lies within the control file's longitude range, grads complains that 'Data Request Warning:  Request is completely outside file limits'. In other words, grads doesnt seem to be able to handle overlapping ranges. Unfortunately, I cant change the user-defined longitude ranges to the 0-360 range, and I 
dont want to be forced to manually edit all of the control file(s) to use the -180=>180 range.


example:
#control file with 0-360 degree longitude range
#longitude is equal to -165 to -116 degree range on -180=>180 degree scale
xdef 736 linear 195.000000 0.066667

...and within grads:
LON set to 195 244
LAT set to 15 50.0002
LEV set to 1 1
Time values set: 2010:10:14:18 2010:10:14:18
E set to 1 1
ga-> set lon -120 -117
LON set to -120 -117
ga-> d myval
Data Request Warning:  Request is completely outside file limits
  Entire grid contents are set to missing data
  Grid limits of file:     X = 1 736  Y = 1 526  Z = 1 1  T = 1 61  E = 1 1
  Grid limits of request:  X = -4724 -4678  Y = -2024 -1978  Z = 1 1  T = 1 1  E = 1 1
  Warning issued for variable = myval
Cannot contour grid - all undefined values


How can I make grads understand that Im trying to plot within a valid longitude range, and automatically adjust the user-defined longitude range to match the control file's longitude range?
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101014/578c0f90/attachment-0003.html 


More information about the gradsusr mailing list