[4320] | 1 | function read_arr2d, filename, varname, t1, t2 |
---|
| 2 | ;; function that read input file and return 2d array with monthly timecounter |
---|
| 3 | nyear = (t2-t1+1)/12 |
---|
| 4 | arr2d = ncdf_lec(filename, VAR=varname) |
---|
| 5 | arr2d = arr2d[t1:t2] |
---|
| 6 | arr2d = reform(arr2d,12,nyear) ; put in 2D array |
---|
| 7 | arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years) |
---|
[2709] | 8 | |
---|
[4320] | 9 | return, arr2d |
---|
| 10 | end |
---|
| 11 | |
---|
| 12 | ;; here start procedure that use function read_arr2d |
---|
| 13 | pro std_ts_ICE, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex |
---|
| 14 | |
---|
[2709] | 15 | compile_opt idl2, strictarrsubs |
---|
| 16 | |
---|
[2751] | 17 | @common |
---|
| 18 | @std_common |
---|
[2709] | 19 | |
---|
[2751] | 20 | ; get exp1 info |
---|
| 21 | vICE1 = getenv('VAR1_ICE') & prefix = getenv('V1ICE_PREF') & suffix = getenv('V1ICE_SUFF') |
---|
| 22 | ; get exp2 info |
---|
| 23 | vICE2 = getenv('VAR2_ICE') & prefix2 = getenv('V2ICE_PREF') & suffix2 = getenv('V2ICE_SUFF') |
---|
[4320] | 24 | ; get ice climatology info |
---|
| 25 | std_file_ice = isafile(getenv('FILE_ICE'), title = 'ICE Extent Climatology', iodir = std_iodir_climato) |
---|
[2751] | 26 | ; |
---|
[4320] | 27 | time_ice = ncdf_lec( std_file_ice, VAR='time' ) |
---|
| 28 | time_ice = (time_ice - FLOOR(time_ice) ) * 12 |
---|
| 29 | time_ice = (round(time_ice) + 11) mod 12; round to nearest integer |
---|
| 30 | t1 = where(time_ice eq 0) |
---|
[4394] | 31 | t1 = t1[0] ; january |
---|
[4320] | 32 | t2 = where(time_ice eq 11, count) |
---|
| 33 | t2 = t2[count-1] ; last day of december |
---|
| 34 | |
---|
| 35 | vICE_ext_NH = read_arr2d(std_file_ice, getenv('VAR_ICE_EXT_NH'), t1, t2 ) |
---|
| 36 | vICE_ext_SH = read_arr2d(std_file_ice, getenv('VAR_ICE_EXT_SH'), t1, t2 ) |
---|
| 37 | ; |
---|
| 38 | vICE_area_NH = read_arr2d(std_file_ice, getenv('VAR_ICE_area_NH'), t1, t2 ) |
---|
| 39 | vICE_area_SH = read_arr2d(std_file_ice, getenv('VAR_ICE_area_SH'), t1, t2 ) |
---|
| 40 | ; |
---|
[2751] | 41 | cdti3 = string(cnt, format = '(i3.3)') |
---|
| 42 | print, cdti3 + ') ' + blabla |
---|
[4320] | 43 | filename = cdti3 + '_ts_ICE_'+prefix |
---|
[2751] | 44 | if prefix NE prefix2 then filename = filename + '_'+prefix2 |
---|
[4320] | 45 | if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1 |
---|
[2751] | 46 | ; |
---|
| 47 | d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')' |
---|
| 48 | ; |
---|
| 49 | iodir = std_iodir_data |
---|
[4320] | 50 | ; ICE Area in NORTH Hemisphere |
---|
[2751] | 51 | domdef, 0, jpi-1, 30, 90, /xindex |
---|
[4320] | 52 | ICE_N = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec) |
---|
| 53 | ICE_N = grossemoyenne(ICE_N.arr, 'xy', /integration, mask2d = masknp) |
---|
[2751] | 54 | |
---|
[4320] | 55 | if jpt mod 12 ne 0 then stop |
---|
| 56 | nyr=jpt/12. |
---|
| 57 | ICE_N = reform(ice_n, 12,nyr) |
---|
| 58 | ICE_n = total(ice_n,2)/nyr |
---|
| 59 | ICE_N = {arr:ICE_N * 1.e-12, unit : '10^12 m^2'} |
---|
| 60 | |
---|
| 61 | ; ICE EXTENT (Area minus 15%) in NORTH Hemisphere |
---|
| 62 | ICE_N_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec) |
---|
| 63 | msk = ICE_N_15.arr gt 0.15 ; remove 0.15% for observations |
---|
| 64 | ICE_N_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp) |
---|
| 65 | if jpt mod 12 ne 0 then stop |
---|
| 66 | nyr=jpt/12. |
---|
| 67 | ICE_N_15 = reform(ice_n_15, 12,nyr) |
---|
| 68 | ICE_n_15 = total(ice_n_15,2)/nyr |
---|
| 69 | ICE_N_15 = {arr:ICE_N_15 * 1.e-12, unit : '10^12 m^2'} |
---|
| 70 | ; |
---|
| 71 | ;ICE Area in SOUTH Hemisphere |
---|
| 72 | domdef, 0, jpi-1, -90, -30, /xindex |
---|
| 73 | ICE_S = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec) |
---|
| 74 | ICE_S = grossemoyenne(ICE_S.arr, 'xy', /integration, mask2d = masknp) |
---|
| 75 | if jpt mod 12 ne 0 then stop |
---|
| 76 | nyr=jpt/12. |
---|
| 77 | ICE_S = reform(ice_S, 12,nyr) |
---|
| 78 | ICE_S = total(ice_S,2)/nyr |
---|
| 79 | ICE_S = {arr:ICE_S * 1.e-12, unit : '10^12 m^2'} |
---|
| 80 | ; ICE EXTENT (Area minus 15%) in SOUTH Hemisphere |
---|
| 81 | ICE_S_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec) |
---|
| 82 | msk = ICE_S_15.arr gt 0.15 ; remove 0.15% for observations |
---|
| 83 | ICE_S_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp) |
---|
| 84 | if jpt mod 12 ne 0 then stop |
---|
| 85 | nyr=jpt/12. |
---|
| 86 | ICE_S_15 = reform(ice_S_15, 12,nyr) |
---|
| 87 | ICE_S_15 = total(ice_S_15,2)/nyr |
---|
| 88 | ICE_S_15 = {arr:ICE_S_15 * 1.e-12, unit : '10^12 m^2'} |
---|
| 89 | ; |
---|
[4755] | 90 | ;;title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) '+d1_d2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (CONTINUOUS) '+'!C'+ 'and Extend minus 15% (DASHED)' |
---|
| 91 | title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) '+d1_d2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (DASHED) '+'!C'+ 'and Extend minus 15% (CONTINUOUS)' |
---|
[4320] | 92 | jpt=12 |
---|
| 93 | time=julday(1,15,1900)+30*lindgen(12) |
---|
[4755] | 94 | pltt, ICE_N, 't', MIN = 4., MAX = 16., /REMPLI, /PORTRAIT, LINESTYLE=2, XGRIDSTYLE = 1, DATE_FORMAT = '%M' $ |
---|
[4395] | 95 | , COLOR = 000 , small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 96 | pltt, ICE_N_15, 't', /REMPLI, /PORTRAIT $ ;;; dashed lines is LINESTYLE=2 $ |
---|
[4395] | 97 | , /ov1d, COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 98 | pltt, vICE_area_NH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ |
---|
[4320] | 99 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 100 | pltt, vICE_ext_NH, 't', /REMPLI, /PORTRAIT $ ;;; dashed lines is LINESTYLE=2 $ |
---|
[4395] | 101 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4320] | 102 | ; |
---|
[4755] | 103 | title = 'Southern Hemisphere'+'!C'+prefix+' (BLACK) '+d1_d2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (DASHED) '+'!C'+ 'and Extend minus 15% (CONTINUOUS)' |
---|
| 104 | pltt, ICE_S, 't', MIN = 0., MAX = 20., /REMPLI, LINESTYLE=2, /NOERASE , XGRIDSTYLE = 1 , DATE_FORMAT = '%M' $ |
---|
[4395] | 105 | ,COLOR = 000, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 106 | pltt, ICE_S_15, 't', /REMPLI, /PORTRAIT $ |
---|
[4395] | 107 | , /ov1d, COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 108 | pltt, vICE_area_SH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ |
---|
[4395] | 109 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 110 | pltt, vICE_ext_SH, 't', /REMPLI, /PORTRAIT $ |
---|
[4320] | 111 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
| 112 | ; |
---|
| 113 | htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png /> ' ] |
---|
[2751] | 114 | if KEYWORD_SET(postscript) then closeps |
---|
[2709] | 115 | |
---|
[2751] | 116 | if prefix NE prefix2 then BEGIN |
---|
[2709] | 117 | |
---|
[2751] | 118 | d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')' |
---|
| 119 | tsave = time |
---|
| 120 | domdef, 0, jpi-1, 30, 90, /xindex |
---|
[4320] | 121 | ;ICE Extent in NORTH Hemisphere |
---|
| 122 | ICE_N2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) |
---|
| 123 | ICE_N2 = grossemoyenne(ICE_N2.arr, 'xy', /integration, mask2d = masknp) |
---|
| 124 | if jpt mod 12 ne 0 then stop |
---|
| 125 | nyr=jpt/12. |
---|
| 126 | ICE_N2 = reform(ICE_N2, 12,nyr) |
---|
| 127 | ICE_N2 = total(ICE_N2,2)/nyr |
---|
| 128 | ICE_N2 = {arr:ICE_N2 * 1.e-12, unit : '10^12 m^2'} |
---|
| 129 | ;ICE Extent minus 15% in NORTH Hemisphere |
---|
| 130 | ICE_N2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) |
---|
| 131 | msk = ICE_N2_15.arr gt 0.15 ; remove 0.15% for observations |
---|
| 132 | ICE_N2_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp) |
---|
| 133 | if jpt mod 12 ne 0 then stop |
---|
| 134 | nyr=jpt/12. |
---|
| 135 | ICE_N2_15 = reform(ICE_N2_15, 12,nyr) |
---|
| 136 | ICE_N2_15 = total(ICE_N2_15,2)/nyr |
---|
| 137 | ICE_N2_15 = {arr:ICE_N2_15 * 1.e-12, unit : '10^12 m^2'} |
---|
| 138 | ;ICE Extent in SOUTH Hemisphere |
---|
| 139 | domdef, 0, jpi-1, -90, -30, /xindex |
---|
| 140 | ICE_S2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) |
---|
| 141 | ICE_S2 = grossemoyenne(ICE_S2.arr, 'xy', /integration, mask2d = masknp) |
---|
| 142 | if jpt mod 12 ne 0 then stop |
---|
| 143 | nyr=jpt/12. |
---|
| 144 | ICE_S2 = reform(ICE_S2, 12,nyr) |
---|
| 145 | ICE_S2 = total(ICE_S2,2)/nyr |
---|
| 146 | ICE_S2 = {arr:ICE_S2 * 1.e-12, unit : '10^12 m^2'} |
---|
| 147 | ;ICE Extent minus 15% in SOUTH Hemisphere |
---|
| 148 | ICE_S2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) |
---|
| 149 | msk = ICE_S2_15.arr gt 0.15 ; remove 0.15% for observations |
---|
| 150 | ICE_S2_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp) |
---|
| 151 | if jpt mod 12 ne 0 then stop |
---|
| 152 | nyr=jpt/12. |
---|
| 153 | ICE_S2_15 = reform(ICE_S2_15, 12,nyr) |
---|
| 154 | ICE_S2_15 = total(ICE_S2_15,2)/nyr |
---|
| 155 | ICE_S2_15 = {arr:ICE_S2_15 * 1.e-12, unit : '10^12 m^2'} |
---|
| 156 | ; |
---|
| 157 | ; time = tsave & IF n_elements(time) NE jpt THEN stop |
---|
[2709] | 158 | |
---|
[2751] | 159 | if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1 |
---|
[2709] | 160 | |
---|
| 161 | |
---|
[4755] | 162 | ;;title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (CONTINUOUS) '+'!C'+ 'and Extend minus 15% (DASHED)' |
---|
| 163 | title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (DASHED) '+'!C'+ 'and Extend minus 15% (CONTINUOUS)' |
---|
[4320] | 164 | jpt=12 |
---|
| 165 | time=julday(1,15,1900)+30*lindgen(12) |
---|
[4755] | 166 | pltt, ICE_N, 't', MIN = 4, MAX = 16, /REMPLI, /PORTRAIT, LINESTYLE=2, XGRIDSTYLE = 1, window = 2, DATE_FORMAT = '%M' $ |
---|
[4395] | 167 | , COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex ; BLACK |
---|
[4755] | 168 | pltt, ICE_N2, 't', /REMPLI, /PORTRAIT , LINESTYLE=2 $ |
---|
[4395] | 169 | , /ov1d, COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex ; RED |
---|
[4755] | 170 | pltt, ICE_N_15, 't', /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2 $ |
---|
[4395] | 171 | , /ov1d, COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 172 | pltt, ICE_N2_15, 't', /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2 $ |
---|
[4395] | 173 | , /ov1d, COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 174 | pltt, vICE_area_NH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ |
---|
[4395] | 175 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex ; light blue |
---|
[4755] | 176 | pltt, vICE_ext_NH, 't', /REMPLI, /PORTRAIT $ |
---|
[4395] | 177 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex ; blu scuro |
---|
[4320] | 178 | ; |
---|
[4755] | 179 | title ='Southern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'OBSERVATION (light blue) '+'!C'+'Global Annual Mean Ice Area (DASHED)'+'!C'+ 'and Extend minus 15% (CONTINUOUS)' |
---|
[4395] | 180 | ; title ='Southern Hemisphere'+'!C' |
---|
[4755] | 181 | pltt, ICE_S, 't', MIN = 0., MAX = 20., /REMPLI, LINESTYLE=2, /NOERASE, XGRIDSTYLE = 1, DATE_FORMAT = '%M' $ |
---|
[4395] | 182 | , COLOR = 000, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 183 | pltt, ICE_S2, 't', /REMPLI, /NOERASE, LINESTYLE=2 $ |
---|
[4395] | 184 | , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 185 | pltt, ICE_S_15 , 't', /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2 $ |
---|
[4395] | 186 | , /ov1d, COLOR = 000, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 187 | pltt, ICE_S2_15, 't', /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2 $ |
---|
[4395] | 188 | , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 189 | pltt, vICE_area_SH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ |
---|
[4395] | 190 | , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4755] | 191 | pltt, vICE_ext_SH, 't', /REMPLI, /PORTRAIT $ |
---|
[4395] | 192 | , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex |
---|
[4320] | 193 | ; |
---|
| 194 | |
---|
[2751] | 195 | htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png /> ' ] |
---|
| 196 | if KEYWORD_SET(postscript) then closeps |
---|
[2709] | 197 | |
---|
| 198 | endif |
---|
| 199 | |
---|
[2751] | 200 | domdef |
---|
[2709] | 201 | |
---|
[2751] | 202 | |
---|
[2709] | 203 | return |
---|
| 204 | end |
---|