[gradsusr] Writing annual time series from monthly data
Andrew Friedman
andfried at gmail.com
Sun Mar 26 08:27:47 EDT 2017
Hi Joyce,
What version of GrADS are you running?
Andrew
> On Mar 26, 2017, at 10:52 AM, Meyerson, Joyce <hobo at atmos.ucla.edu> wrote:
>
> Dear Grads User Group,
>
> I have a simple script which I have used many times over the years to calculate an annual mean time series from monthly CRU temperature data. Now instead of outputting 167 annual means it is only outputting 50 and it is skipping every 3rd value. I have no idea what has happened. Any help???
>
> Joyce
>
> 'sdfopen CRUTEM.4.5.0.0.anomalies.nc'
>
> 'set time jan1850 dec2016'
>
> 'set x 1'
> 'set y 1'
> 'define ts=aave(temperature_ano,x=1,x=72,y=1,y=36)'
>
> n=7
> yr=1850
> while (n<2005)
> 'set t 'n''
> 'define ann'yr'=ave(ts,t-6,t+5)'
> yr=yr+1
> n=n+12
> endwhile
>
> 'set t 7'
> 'set gxout fwrite sequential'
> 'set fwrite CRUTEM.4.5_anntasa_61-90clim_1850-2016.out'
> 'set x 1'
> 'set y 1'
>
> 'd ann1850'
> 'd ann1851'
> 'd ann1852'
> 'd ann1853'
> 'd ann1854'
> ...
> 'disable fwrite'
>
>
> ************************
> DSET ^CRUTEM.4.5_anntasa_61-90clim_1850-2016.out
> TITLE global annual avg. 2mTemp anom
> * CRUTEM2v - variance adjusted version of CRUTEM2 (see Jones et al., 2001 for details of the variance adjustment method) 61-90 clim
> UNDEF -9.99E23
> OPTIONS sequential little_endian
> XDEF 1 linear 0 1
> YDEF 1 linear 0 1
> ZDEF 1 linear 0 1
> TDEF 167 linear 16JAN1850 1yr
> VARS 1
> ta 0 2m temp anom
> ENDVARS
> ******************************
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list