[gradsusr] World Coordinates convert to non-integer grid coordinates

Jan Ising jising at aggies.ncat.edu
Sat May 23 11:36:50 EDT 2020


Hello GrADS community,

    I am trying to plot an arbitrary cross section of RH from lev = 900 to
lev = 800. My .ctl file has the following levels in between:
900mb,850mb,825mb,820mb,810mb,800mb (Im working in a high elevation and
trying to get as close to just above the ground as possible without going
into the ground). If I plot RH individually say, for example, at 820mb by
doing 'd rh(z = 11)', where z = 11 corresponds to 820mb, it works fine but
if I use the arbitrary cross section method and have z vary from (in my
case) z = 8 to z = 13 I get the error "World Coordinates convert to
non-integer grid coordinates". Does anyone have a solution to this or a
workaround?I am still new to GrADS so perhaps the answer is obvious here.



Here is my script if it is of any use:

'open (file).ctl'
'set display white'
*sets the time
'set t 1'
*sets the cross section (note the exact values were modified for the
problem purposes)
lon1 = -112
lon2 = -110
lat1 = 35.5
lat2 = 34.5
lon = lon1
*frees collection 1 from memory
'collect 1 free'
while (lon <= lon2)
*sets the vertical range
'set z 8 13'
*iterates the latitude
lat = lat1 + (lat2-lat1)*(lon-lon1) / (lon2-lon1)
'set lon 'lon
'set lat 'lat
*Creates collection
'collect 1 gr2stn(rh,'lon','lat')'
*iterates the longitude by an increment based on the file resolution
lon = lon + 0.008
endwhile
'set lon 'lon1' 'lon2
*displays "station" data as shaded gridded data
'set gxout shaded'
'd coll2gr(1,-u)'
'cbarn'
'close 1'


Any help/suggestions would be greatly appreciated.

-Thank you,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200523/141cfb03/attachment.html>


More information about the gradsusr mailing list