[gradsusr] arbitrary cross section

Sim Aberson sim.aberson at noaa.gov
Thu Mar 24 10:50:38 EDT 2022


I am trying to plot a cross section of wind speed through the center of
a hurricane.  I adapted a script I found many places online, but I only
get errors.  The script is:

'open TEDDY20L_202009181830_Postr_Mean.ctl'
'set grads off'
'set zlog on'
'set x 1'
'set y 1'
'set lev 1000 100'
lat1 = 19.532
lon1 = -53.56
lat2 = 18.927
lon2 = -52.745
lon = lon1
'collect 1 free'
while (lon <= lon2)
  lat = lat1 + (lat2-lat1)*(lon-lon1) / (lon2-lon1)
  say ' lat,lon = 'lat' 'lon
 'collect 1
gr2stn(mag(maskout(ugrdprs,hgtprs),maskout(vgrdprs,hgtprs)),'lon','lat')'
  lon = lon + 0.1
endwhile

'set x 14 16'
'set xaxis 'lon1' 'lon2
'set clab on'
'set gxout shaded'
'd coll2gr(1,-u)'
'set gxout contour'
'set cint 5'
'd coll2gr(1,-u)'

When I run this, I get:


 lat,lon = 19.532 -53.56
Data Request Warning:  Request is completely outside file limits
Data Request Warning:  Request is completely outside file limits
Data Request Warning:  Request is completely outside file limits
etc.

All the points are within the domain, but I get all undefined values.
The file dimensions are

ga-> q dims
Default file number is: 1
X is fixed     Lon = -58.489  X = 1
Y is fixed     Lat = 20.948  Y = 1
Z is varying   Lev = 1000 to 100   Z = 1 to 43
T is fixed     Time = 18Z18SEP2020  T = 1
E is fixed     Ens = 1  E = 1

Obviously I'm doing something wrong, but I have no idea what.  I tried
it without the maskout function.  I tried it on a single variable.  Same
results, so it's not those.

You can find the data and control file at
https://www.aoml.noaa.gov/ftp/hrd/aberson/HEDASanalyses/.


-- 
Sim Aberson (he/him/his)
NOAA/AOML/Hurricane Research Division   Miami, FL
https://www.aoml.noaa.gov/hrd/people/simdaberson/

AOML stands on the land of the Tequesta, Calusa, Miccosukee and Seminole
peoples.  This acknowledgment is one way to educate ourselves about this
land, its history, and our relationships with the land and each other.


More information about the gradsusr mailing list