[162] | 1 | ;+ |
---|
[2] | 2 | ; |
---|
| 3 | ; Read/compute monthly density projection to build annual (Paul Williams) |
---|
| 4 | ; |
---|
[162] | 5 | ; @version |
---|
| 6 | ; $Id$ |
---|
| 7 | ; |
---|
| 8 | ;- |
---|
[2] | 9 | |
---|
| 10 | really_1m_st = 0 |
---|
| 11 | start_year = cmd.date1 |
---|
| 12 | end_year = cmd.spec |
---|
| 13 | boxst = def_box(cmd.plt, dimplot, boxname, time_stride) |
---|
| 14 | domdef, boxst |
---|
| 15 | grille,mask,glam,gphi,gdep,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz |
---|
| 16 | output = fltarr( nx, ny, (sig_max - sig_min)/sig_del + 1, uint(cmd.spec)-uint(cmd.date1)+1) |
---|
| 17 | FOR year_s = uint(cmd.date1), uint(cmd.spec) DO BEGIN |
---|
| 18 | print, 'plt_map: Constructing annual mean from monthly means for year', year_s |
---|
| 19 | cmd.timave = '1m' |
---|
| 20 | cumulative = 0. |
---|
| 21 | FOR i = 1, 12 DO BEGIN |
---|
| 22 | IF strlen(strmid(strcompress(string(year_s)),1)) eq 1 THEN year_s_string = '0'+strmid(strcompress(string(year_s)),1) |
---|
| 23 | IF strlen(strmid(strcompress(string(year_s)),1)) GT 1 THEN year_s_string = strmid(strcompress(string(year_s)),1) |
---|
| 24 | IF i LE 9 THEN BEGIN |
---|
| 25 | cmd.date1 = year_s_string+'0'+strtrim(string(i), 2) |
---|
| 26 | ENDIF ELSE BEGIN |
---|
| 27 | cmd.date1 = year_s_string+strtrim(string(i), 2) |
---|
| 28 | ENDELSE |
---|
| 29 | cmd.spec = cmd.date1 |
---|
| 30 | print, 'Date = ', cmd.date1 |
---|
| 31 | pltcmd = 'fields = data_read(cmd,'''+hotyp+''','''+plttyp+''','+string(dimplot)+','+string(iover)+all_data_str+', ZMTYP = '''+cmd.plt+''')' |
---|
| 32 | printf, nulhis, strcompress(pltcmd) |
---|
| 33 | printf, nulhis, ' ' |
---|
| 34 | res = execute(pltcmd) |
---|
| 35 | cumulative = cumulative + fields.data |
---|
| 36 | ENDFOR |
---|
| 37 | output(*, *, *, year_s-uint(start_year)) = cumulative/12. |
---|
| 38 | ENDFOR |
---|
| 39 | ; redefine cmd.* to be their initial values before the monthly loop |
---|
| 40 | cmd.timave = '1y' |
---|
| 41 | cmd.date1 = start_year |
---|
| 42 | cmd.spec = end_year |
---|
| 43 | ; call to compute_time to redefine timearr (see data_read) |
---|
| 44 | timearr = compute_time(cmd.timave, cmd.date1, cmd.spec) |
---|
| 45 | jpt = timearr.count |
---|
| 46 | time = timearr.scale |
---|
| 47 | field = {name: fields.name, data: output, legend: fields.legend, units: fields.units, origin: fields.origin, dim: 2, direc: ''} |
---|