[gradsusr] Find positions a value of variable

Maria Laura Cariaga laura.cariaga at gmail.com
Sun Feb 13 14:57:20 EST 2011


Hi!
I'm trying to make a program do the following:
I read a file from the reanalysis (NetCDF)
I have monthly average data, 52, single variable, at a fixed level.
I want to search on a domain, the maximum value of that variable, and also the
value of the latitudinal and longitudinal position of the maximum.
Find the maximum value is not a problem. The problem is to find positions.
Could you help me? I can not find the solution ... : (

The script that I created is:
----------------------------------------------------------------------------------------------------------
'reinit'

'sdfopen ene61dic10.nc'

'set lev 1000'
'set lat -50 0'
'set lon -40 10'
'q time'


t=1
while (t<601)
'set t 't
'set gxout print'
'd max(max(hgt,lon=-40,lon=10),lat=-50,lat=0)'
ret=result
res=write('salida_aas.txt',ret)

t = t + 1
endwhile
-------------------------------------------------------------------------------------------------------------

Best regards,
Maria Laura Cariaga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110213/19304d53/attachment-0003.html 


More information about the gradsusr mailing list