[4394] | 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 |
---|
[4755] | 7 | ;arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years) |
---|
| 8 | arr2d = arr2d[*, nyear-1] ; select last year |
---|
[4394] | 9 | |
---|
| 10 | return, arr2d |
---|
| 11 | end |
---|
| 12 | |
---|
[4498] | 13 | ;; here start procedure that use function read_arr2d |
---|
[4394] | 14 | pro std_ts_ICE_FRAM, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex |
---|
| 15 | |
---|
| 16 | compile_opt idl2, strictarrsubs |
---|
| 17 | |
---|
| 18 | @common |
---|
| 19 | @std_common |
---|
| 20 | |
---|
| 21 | ; get exp1 info |
---|
| 22 | vICE1 = getenv('VAR1_ICE') & prefix = getenv('V1ICE_PREF') & suffix = getenv('V1ICE_SUFF') |
---|
| 23 | v1_Ithick = getenv('VAR1_Ithick') & prefix = getenv('V1It_PREF') & suffix = getenv('V1It_SUFF') |
---|
| 24 | v1_IV = getenv('VAR1_IvelV') & prefix = getenv('V1IvV_PREF') & suffix = getenv('V1IvV_SUFF') |
---|
| 25 | ; get exp2 info |
---|
| 26 | vICE2 = getenv('VAR2_ICE') & prefix2 = getenv('V2ICE_PREF') & suffix2 = getenv('V2ICE_SUFF') |
---|
| 27 | v2_Ithick = getenv('VAR2_Ithick') & prefix2 = getenv('V2It_PREF') & suffix2 = getenv('V2It_SUFF') |
---|
[4498] | 28 | v2_IV = getenv('VAR2_IvelV') & prefix2 = getenv('V2IvV_PREF') & suffix2 = getenv('V2IvV_SUFF') |
---|
[4394] | 29 | |
---|
| 30 | cdti3 = string(cnt, format = '(i3.3)') |
---|
| 31 | print, cdti3 + ') ' + blabla |
---|
| 32 | filename = cdti3 + '_ts_ICE_FRAM_'+prefix |
---|
| 33 | if prefix NE prefix2 then filename = filename + '_'+prefix2 |
---|
| 34 | if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1 |
---|
| 35 | ; |
---|
| 36 | d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')' |
---|
[4755] | 37 | d2 = '('+strtrim(date2, 1)+')' |
---|
[4394] | 38 | ; |
---|
| 39 | iodir = std_iodir_data |
---|
| 40 | ; ICE Area(=Surface) in FRAM Strait |
---|
| 41 | ;; FRAM Strait points, computed with ncview meshmask for ORCA2 grid (133-1434-135-136, 137) |
---|
| 42 | indx0 = 133 |
---|
| 43 | indx0_last = 136 |
---|
| 44 | indy0 = 137 |
---|
| 45 | indy0_last = 137 |
---|
| 46 | ;; ORI domdef, 133, 137, 136, 136, /xindex, /yindex,/memeindices |
---|
| 47 | indx1= (indx0 - ixminmesh + key_shift)mod(jpi) |
---|
| 48 | indx2= (indx0_last - ixminmesh + key_shift)mod(jpi) |
---|
| 49 | indy1= indy0 - iyminmesh |
---|
| 50 | indy2= indy1 |
---|
| 51 | ; |
---|
[4497] | 52 | ;OBSERVATIONS : mean seasonal cycle/month |
---|
[4514] | 53 | ; vol_obs = [0.261625, 0.230750, 0.325375, 0.252000, 0.172500, 0.0805000, 0.0805000, 0.0805000, 0.0805000, 0.176500, 0.148500, 0.235000] |
---|
| 54 | vol_obs = [261.625, 230.750, 325.375, 252.000, 172.500, 80.5000, 80.5000, 80.5000, 80.5000, 176.500, 148.500, 235.000] |
---|
[4497] | 55 | area_obs = [0.103292, 0.0997500, 0.107625, 0.0944167, 0.0612083, 0.0262500, 0.0262500, 0.0262500, 0.0262500, 0.0843750, 0.0914583, 0.104083] |
---|
| 56 | ; |
---|
[4394] | 57 | domdef, indx1, indx2, indy1, indy2, /xindex, /yindex,/memeindices |
---|
| 58 | ICE = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct) |
---|
| 59 | ICE_thick = rseries_ncdf(v1_Ithick, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct) |
---|
| 60 | ; domdef for V-Point in j-1 |
---|
| 61 | ; REALLY NOT NECESSARY, BECAUSE FLUX CAN BE COMPUTED IN J POINT, is the same |
---|
| 62 | domdef, indx1, indx2, indy1-1, indy2-1, /xindex, /yindex,/memeindices |
---|
[4504] | 63 | VN = rseries_ncdf(v1_IV, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec,/nostruct) ;!! warning positive northward |
---|
[4394] | 64 | |
---|
| 65 | ;; Area export |
---|
[4504] | 66 | ICE_area_export = (-1) * ICE * VN * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) |
---|
[4394] | 67 | ICE_area_export = total(reform(ICE_area_export),1) ; in m2/s -> need to change the unit? |
---|
| 68 | |
---|
| 69 | ;; Volume export |
---|
[4504] | 70 | ICE_vol_export = (-1) * ICE * ICE_thick * VN * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) |
---|
[4394] | 71 | ICE_vol_export = total(reform(ICE_vol_export),1) ;! in m3/s -> need to change the unit? |
---|
| 72 | |
---|
| 73 | ; needed for seasonal cycle : |
---|
| 74 | if jpt mod 12 ne 0 then stop |
---|
| 75 | nyr=jpt/12. |
---|
| 76 | ;; AREA |
---|
| 77 | ICE_area_export = reform(ICE_area_export, 12, nyr) |
---|
[4755] | 78 | ;ICE_area_export = total(ICE_area_export,2)/nyr ; old version monthly mean average over all years |
---|
| 79 | ICE_area_export = ICE_area_export[*,nyr-1] ; dim= 12, index 0-11; last year choosen |
---|
[4495] | 80 | ; ICE_area_export = {arr:ICE_area_export * 1.e-12 * 86400 * 365 , unit : '10^6 Km^2/year'} ; annual mean |
---|
| 81 | ICE_area_export = {arr:ICE_area_export * 1.e-12 * 86400 * 30 , unit : '10^6 Km^2/month'} ; monthly mean |
---|
| 82 | |
---|
[4394] | 83 | ; |
---|
| 84 | ICE_vol_export = reform(ICE_vol_export, 12, nyr) |
---|
[4755] | 85 | ;ICE_vol_export = total(ICE_vol_export,2)/nyr |
---|
| 86 | ICE_vol_export = ICE_vol_export[*,nyr-1] |
---|
[4514] | 87 | ; ICE_vol_export = {arr:ICE_vol_export * 1.e-9 * 86400 * 365 , unit : '10^3 Km^3/year'} ; annual mean |
---|
| 88 | ICE_vol_export = {arr:ICE_vol_export * 1.e-9 * 86400 * 30 , unit : '10^3 Km^3/month'} ; monthly mean |
---|
[4394] | 89 | |
---|
| 90 | ; |
---|
[4755] | 91 | ;title = 'Fram Strait Areal Export: LAST YEAR'+'!C'+prefix+' '+d1_d2 |
---|
| 92 | title = 'Fram Strait Areal Export: LAST YEAR'+'!C'+prefix+' '+d2 |
---|
[4394] | 93 | jpt=12 |
---|
| 94 | time=julday(1,15,1900)+30*lindgen(12) |
---|
[4497] | 95 | pltt, ICE_area_export, 't', /REMPLI, /PORTRAIT, MIN = 0., MAX = .5 , XGRIDSTYLE = 1 $ |
---|
| 96 | , small = [1, 2, 1],YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
| 97 | pltt, area_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4 $ ; light blue |
---|
| 98 | , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
[4394] | 99 | ; |
---|
[4497] | 100 | tot_area_expo = total(ICE_area_export.arr) |
---|
| 101 | ; |
---|
[4514] | 102 | xyouts, julday(5,15,1900), 0.49, 'Tot. Annual Export OBS = 0.851 million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 103 | xyouts, julday(5,15,1900), 0.46, 'Tot. Annual Export Model = '+strtrim(tot_area_expo, 1)+' million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 104 | xyouts, julday(7,15,1900), 0.41, 'Data from Kwok et al.(2004), 1979-2002 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2 |
---|
| 105 | ; |
---|
[4755] | 106 | ;title = 'Fram Strait Volume Export LAST YEAR'+'!C'+prefix+' '+d1_d2 |
---|
| 107 | title = 'Fram Strait Volume Export LAST YEAR'+'!C'+prefix+' '+d2 |
---|
[4514] | 108 | pltt, ICE_vol_export, 't', /REMPLI, MIN = 60., MAX = 500. , /NOERASE, XGRIDSTYLE = 1 $ |
---|
[4497] | 109 | , small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
| 110 | pltt, vol_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4 $ ; light blue |
---|
| 111 | , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^6 Km^2/month',DATE_FORMAT = '%M', TITLE = title, _extra = ex |
---|
[4394] | 112 | ; |
---|
[4497] | 113 | tot_vol_expo = total(ICE_vol_export.arr) |
---|
| 114 | tot_vol_expo_Sv = tot_vol_expo * 1.e06 * 1/86400 * 1/365 ; annual mean in Sverdrup |
---|
[4514] | 115 | xyouts, julday(5,15,1900), 490, 'Tot. Annual Export OBS = 2124 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 116 | xyouts, julday(5,15,1900), 460, 'Tot. Annual Export Model = '+strtrim(tot_vol_expo, 1)+' 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 117 | xyouts, julday(9,15,1900), 440, 'in Sv = '+strtrim(tot_vol_expo_Sv, 1)+' Sv', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 118 | xyouts, julday(7,15,1900), 360, 'Data from Kwok et al.(2004), 1992-1998 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2 |
---|
[4497] | 119 | |
---|
[4394] | 120 | htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png /> ' ] |
---|
| 121 | if KEYWORD_SET(postscript) then closeps |
---|
| 122 | |
---|
| 123 | if prefix NE prefix2 then BEGIN |
---|
| 124 | |
---|
| 125 | d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')' |
---|
[4755] | 126 | d2_2 = '('+strtrim(date2_2, 1)+')' |
---|
[4394] | 127 | tsave = time |
---|
| 128 | domdef, indx1, indx2, indy1, indy2, /xindex, /yindex,/memeindices |
---|
| 129 | ICE_2= rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct) |
---|
| 130 | ICE_thick_2 = rseries_ncdf(v2_Ithick, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct) |
---|
| 131 | ; domdef for V-Point in j-1 |
---|
| 132 | ; REALLY NOT NECESSARY, BECAUSE FLUX CAN BE COMPUTED IN J POINT, is the same |
---|
| 133 | domdef, indx1, indx2, indy1-1, indy2-1, /xindex, /yindex,/memeindices |
---|
[4504] | 134 | VN_2 = rseries_ncdf(v2_IV, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec,/nostruct) ;!! warning positive northward |
---|
[4394] | 135 | |
---|
| 136 | ;; Area export |
---|
[4504] | 137 | ICE_area_export_2 = (-1) * ICE_2 * VN_2 * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) |
---|
[4394] | 138 | ICE_area_export_2 = total(reform(ICE_area_export_2),1) ; in m2/s -> need to change the unit? |
---|
| 139 | |
---|
| 140 | ;; Volume export |
---|
[4504] | 141 | ICE_vol_export_2 = (-1) * ICE_2 * ICE_thick_2 * VN_2 * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) |
---|
[4394] | 142 | ICE_vol_export_2 = total(reform(ICE_vol_export_2),1) ;! in m3/s -> need to change the unit? |
---|
| 143 | |
---|
| 144 | ; needed for seasonal cycle : |
---|
| 145 | if jpt mod 12 ne 0 then stop |
---|
| 146 | nyr=jpt/12. |
---|
| 147 | ;; AREA |
---|
| 148 | ICE_area_export_2 = reform(ICE_area_export_2, 12, nyr) |
---|
[4755] | 149 | ;ICE_area_export_2 = total(ICE_area_export_2,2)/nyr |
---|
| 150 | ICE_area_export_2 = ICE_area_export_2[*,nyr-1] |
---|
[4495] | 151 | ; ICE_area_export_2 = {arr:ICE_area_export_2 * 1.e-12 * 86400 * 365 , unit : '10^6 Km^2/year'} ; annual mean |
---|
| 152 | ICE_area_export_2 = {arr:ICE_area_export_2 * 1.e-12 * 86400 * 30 , unit : '10^6 Km^2/month'} ; monthly mean |
---|
[4394] | 153 | ; |
---|
| 154 | ICE_vol_export_2 = reform(ICE_vol_export_2, 12, nyr) |
---|
[4755] | 155 | ;ICE_vol_export_2 = total(ICE_vol_export_2,2)/nyr |
---|
| 156 | ICE_vol_export_2 = ICE_vol_export_2[*,nyr-1] |
---|
[4495] | 157 | ; ICE_vol_export_2 = {arr:ICE_vol_export_2 * 1.e-12 * 86400 * 365 , unit : '10^3 Km^3/year'} ; annual mean |
---|
[4514] | 158 | ICE_vol_export_2 = {arr:ICE_vol_export_2 * 1.e-9 * 86400 * 30 , unit : '10^3 Km^3/month'} ; monthly mean |
---|
[4394] | 159 | ; |
---|
| 160 | ; |
---|
| 161 | if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1 |
---|
| 162 | |
---|
[4755] | 163 | ;title = 'Fram Strait Areal Export'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 |
---|
| 164 | title = 'Fram Strait Areal Export LAST YEAR'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d2_2 |
---|
[4394] | 165 | jpt=12 |
---|
| 166 | time=julday(1,15,1900)+30*lindgen(12) |
---|
[4497] | 167 | pltt, ICE_area_export, 't', /REMPLI, /PORTRAIT, MIN = 0., MAX = .5, XGRIDSTYLE = 1, window = 2 $ |
---|
| 168 | , small = [1, 2, 1], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
| 169 | pltt, ICE_area_export_2 ,'t', /REMPLI, /PORTRAIT, /NOERASE $ |
---|
| 170 | , /ov1d, COLOR = 250, small = [1, 2, 1],YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
| 171 | pltt, area_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4 $ ; light blue |
---|
[4504] | 172 | , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
[4394] | 173 | ; |
---|
[4497] | 174 | tot_area_expo = total(ICE_area_export.arr) |
---|
| 175 | tot_area_expo_2 = total(ICE_area_export_2.arr) |
---|
| 176 | ; |
---|
[4514] | 177 | xyouts, julday(5,15,1900), 0.49, 'Tot. Annual Export OBS = 0.851 million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 178 | xyouts, julday(5,15,1900), 0.46, 'Tot. Annual Export Model 1= '+strtrim(tot_area_expo, 1)+' million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 179 | xyouts, julday(5,15,1900), 0.43, 'Tot. Annual Export Model 2= '+strtrim(tot_area_expo_2, 1)+' million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 180 | xyouts, julday(7,15,1900), 0.41, 'Data from Kwok et al.(2004), 1979-2002 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2 |
---|
| 181 | ; |
---|
[4755] | 182 | ;title = 'Fram Strait Volume Export'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 |
---|
| 183 | title = 'Fram Strait Volume Export LAST YEAR'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d2_2 |
---|
[4514] | 184 | pltt, ICE_vol_export, 't', /REMPLI, MIN = 60., MAX = 500., /NOERASE, XGRIDSTYLE = 1 $ |
---|
[4497] | 185 | , small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
| 186 | pltt, ICE_vol_export_2, 't', /REMPLI, /NOERASE $ |
---|
| 187 | , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
| 188 | pltt, vol_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4 $ ; light blue |
---|
| 189 | , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex |
---|
[4394] | 190 | ; |
---|
[4497] | 191 | tot_vol_expo = total(ICE_vol_export.arr) |
---|
| 192 | tot_vol_expo_2 = total(ICE_vol_export_2.arr) |
---|
| 193 | tot_vol_expo_Sv = tot_vol_expo * 1.e06 * 1/86400 * 1/365 ; annual mean in Sverdrup |
---|
| 194 | tot_vol_expo_2_Sv = tot_vol_expo_2 * 1.e06 * 1/86400 * 1/365 ; annual mean in Sverdrup |
---|
[4514] | 195 | xyouts, julday(5,15,1900), 490, 'Tot. Annual Export OBS = 2124 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 196 | xyouts, julday(5,15,1900), 460, 'Tot. Annual Export Model 1 = '+strtrim(tot_vol_expo, 1)+' 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 197 | xyouts, julday(9,15,1900), 440, 'in Sv = '+strtrim(tot_vol_expo_Sv, 1)+' Sv', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 198 | xyouts, julday(5,15,1900), 410, 'Tot. Annual Export Model 2 = '+strtrim(tot_vol_expo_2, 1)+' 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 199 | xyouts, julday(9,15,1900), 390, 'in Sv = '+strtrim(tot_vol_expo_2_Sv, 1)+' Sv', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2 |
---|
| 200 | xyouts, julday(7,15,1900), 360, 'Data from Kwok et al.(2004), 1992-1998 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2 |
---|
[4394] | 201 | |
---|
| 202 | htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png /> ' ] |
---|
| 203 | if KEYWORD_SET(postscript) then closeps |
---|
| 204 | |
---|
| 205 | endif |
---|
| 206 | |
---|
| 207 | domdef |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | return |
---|
| 211 | end |
---|