Hi Steffie,
here is the procedure to do annual values for the seasonal averages of that years. I have used monthly data for my study.
use
file.ncsh da
let temp1=variable
use climatological_axes
cancel data climatological_axes
let temp_cli=temp1[gt=month_`temp1,return=cal`@mod] !<<<<<<<<<<<forurisional file<<<<<<<<<<<<<<<<<<<<!
let temp_anm1=temp1-temp_cli[gt=temp1@asn]
let temp_anm=temp_anm1
let year_months=mod(l[gt=temp_anm],12)
define axis/units=years/edges/t0=15-dec-1978/t=15-jan-1979:15-jan-2016:1/calendar=gregorian t_yearly !!! please check your data starts from 15 of every month or 30 or 1 of every month !!!!!
!!! because of /edges time axis starts from 1 month back as t0=15-dec-1978 and ends 1 month after as 15-jan-2016
!<<<<<<<<<<<<<<< Masking for fall(SON) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let mask1 = IF year_months le 11.0 then 1
let mask2 = IF year_months ge 9.0 then 1
!<<<<<<<<<<<<<<<<Masking for spring (MAM)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let mask3 = if year_months ge 3.0 then 1
let mask4 = if year_months le 5.0 then 1
!<<<<<<<<<<<<<<<<Masking for summer(JJA)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let mask5 = if year_months ge 6.0 then 1
let mask6 = if year_months le 8.0 then 1
!<<<<<<<<<<<<<<<<Masking for summer(DJF)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let mask7 = if year_months eq 0.0 then 1
let mask8 = if year_months eq 1.0 then 1
let mask9 = if year_months eq 2.0 then 1
!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let mask_fall = mask1*mask2
let mask_spring = mask3*mask4
let mask_summer = mask5*mask6
let mask_D = mask7
let mask_j = mask8
let mask_f = mask9
let temp_anm_son = temp_anm*mask_fall
let temp_anm_mam = temp_anm*mask_spring
let temp_anm_jja = temp_anm*mask_summer
let temp_anm_d = temp_anm*mask_D
let temp_anm_j = temp_anm*mask_j
let temp_anm_f = temp_anm*mask_f
let temp_son=temp_anm_son[gt=t_yearly@ave]
let temp_mam=temp_anm_mam[gt=t_yearly@ave]
let temp_jja=temp_anm_jja[gt=t_yearly@ave]
let temp_anm_dec = temp_anm_d[gt=t_yearly@ave]
let temp_anm_jan = temp_anm_j[gt=t_yearly@ave]
let temp_anm_feb = temp_anm_f[gt=t_yearly@ave]
let temp_anm_jan1 = temp_anm_jan[l=@shf:1]
let temp_anm_feb1 = temp_anm_feb[l=@shf:1]
let temp_djf= (temp_anm_dec+temp_anm_jan1+temp_anm_feb1)/3.0
exit
let us know if you face any problem
regards, saurabh