[gradsusr] correlation

"Rogert Sorí Gómez" rogert.sori at mail.com
Mon Mar 25 13:22:16 EDT 2013


Hi !!! I am trying to correlate Sea Surface Temperatures with 1 degree of resolution and precipitation of GPCP with 2.5 resolution but just for some years. But I am begining using Grads and I could not find a function to do that. I will thanks your help very much.


*climatologia
'reinit'
'sdfopen F:\climadatos\sst.mnmean_2.nc'
'sdfopen F:\climadatos\gpcpprecipitacion.nc'
'set map 1 1 6'
'set grid off'
'set clopts 1 1 0.14'
'set xlopts 1 2 0.14'
'set ylopts 1 2 0.14'
* Estes são tons de AZUL
'set rgb 16 0 0 255'
'set rgb 17 20 20 255'
'set rgb 18 55 55 255'
'set rgb 19 110 110 255'
'set rgb 20 165 165 255'
'set rgb 21 220 220 255'
* Estes são tons de AMARELO-VERMELHO
'set rgb 22 230 220 51'
'set rgb 23 230 176 46'
'set rgb 24 240 130 41'
'set rgb 25 240 100 20'
'set rgb 26 255 55 55'
'set rgb 27 255 0 0'
'set lat 10 50'
'set lon 255 345'
* jan 82 a jan 2010
tempo=1
while (tempo<13)
* clima 82 a 99 (jan 82 t=37) (jan2010 t=373)
* anomp: 1987, 1998, 2005, 2006, 2010
'define comppos=(precip.1(t='tempo+96')+precip.1(t='tempo+228')+precip.1(t='tempo+312')+precip.1(t='tempo+324')+precip.1(t='tempo+372'))/5'
'define compneg=(sst(t='tempo+61')+sst(t='tempo+193')+sst(t='tempo+276')+sst(t='tempo+289')+sst(t='tempo+337'))/5'
 'set grads off'
 'set grid off' 
 'set gxout shaded'
 'set clevs -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1'
 'set ccols 16 17 18 19 20 0 0 22 23 24 25 26 27'
 'd fcorr(precip.1, sst)'
 'draw title Flujo Vertical Integrado de Humedad (kg/m/s)\ y Correlacion (Unidades)'
 'run F:\climadatos\cbarn.gs.gs'
 'printim correlacionsstprecip'mes'.gif gif white'
 'c'
 tempo=tempo+1
 mes=mes+1
endwhile
'quit'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130325/dd79c5d0/attachment-0003.html 


More information about the gradsusr mailing list