function read_arr2d, filename, varname, t1, t2 ;; function that read input file and return 2d array with monthly timecounter nyear = (t2-t1+1)/12 arr2d = ncdf_lec(filename, VAR=varname) arr2d = arr2d[t1:t2] arr2d = reform(arr2d,12,nyear) ; put in 2D array arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years) return, arr2d end ; ; pro std_ts_ICE_FRAM, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex compile_opt idl2, strictarrsubs @common @std_common ; get exp1 info vICE1 = getenv('VAR1_ICE') & prefix = getenv('V1ICE_PREF') & suffix = getenv('V1ICE_SUFF') v1_Ithick = getenv('VAR1_Ithick') & prefix = getenv('V1It_PREF') & suffix = getenv('V1It_SUFF') v1_IV = getenv('VAR1_IvelV') & prefix = getenv('V1IvV_PREF') & suffix = getenv('V1IvV_SUFF') ; get exp2 info vICE2 = getenv('VAR2_ICE') & prefix2 = getenv('V2ICE_PREF') & suffix2 = getenv('V2ICE_SUFF') v2_Ithick = getenv('VAR2_Ithick') & prefix2 = getenv('V2It_PREF') & suffix2 = getenv('V2It_SUFF') v2_IV = getenv('VAR2_IvelV') & prefix = getenv('V2IvV_PREF') & suffix = getenv('V2IvV_SUFF') cdti3 = string(cnt, format = '(i3.3)') print, cdti3 + ') ' + blabla filename = cdti3 + '_ts_ICE_FRAM_'+prefix if prefix NE prefix2 then filename = filename + '_'+prefix2 if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1 ; d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')' ; iodir = std_iodir_data ; ICE Area(=Surface) in FRAM Strait ;; FRAM Strait points, computed with ncview meshmask for ORCA2 grid (133-1434-135-136, 137) indx0 = 133 indx0_last = 136 indy0 = 137 indy0_last = 137 ;; ORI domdef, 133, 137, 136, 136, /xindex, /yindex,/memeindices indx1= (indx0 - ixminmesh + key_shift)mod(jpi) indx2= (indx0_last - ixminmesh + key_shift)mod(jpi) indy1= indy0 - iyminmesh indy2= indy1 ; domdef, indx1, indx2, indy1, indy2, /xindex, /yindex,/memeindices ICE = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct) ICE_thick = rseries_ncdf(v1_Ithick, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct) ; domdef for V-Point in j-1 ; REALLY NOT NECESSARY, BECAUSE FLUX CAN BE COMPUTED IN J POINT, is the same domdef, indx1, indx2, indy1-1, indy2-1, /xindex, /yindex,/memeindices VN = rseries_ncdf(v1_IV, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec,/nostuct) ;!! warning positive northward ;; Area export ICE_area_export = (-1) * ICE * VN.arr * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) ICE_area_export = total(reform(ICE_area_export),1) ; in m2/s -> need to change the unit? ;; Volume export ICE_vol_export = (-1) * ICE * ICE_thick * VN.arr * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) ICE_vol_export = total(reform(ICE_vol_export),1) ;! in m3/s -> need to change the unit? ; needed for seasonal cycle : if jpt mod 12 ne 0 then stop nyr=jpt/12. ;; AREA ICE_area_export = reform(ICE_area_export, 12, nyr) ICE_area_export = total(ICE_area_export,2)/nyr ; ICE_area_export = {arr:ICE_area_export * 1.e-12 * 86400 * 365 , unit : '10^6 Km^2/year'} ; annual mean ICE_area_export = {arr:ICE_area_export * 1.e-12 * 86400 * 30 , unit : '10^6 Km^2/month'} ; monthly mean ; ICE_vol_export = reform(ICE_vol_export, 12, nyr) ICE_vol_export = total(ICE_vol_export,2)/nyr ; ICE_vol_export = {arr:ICE_vol_export * 1.e-12 * 86400 * 365 , unit : '10^3 Km^3/year'} ; annual mean ICE_vol_export = {arr:ICE_vol_export * 1.e-12 * 86400 * 30 , unit : '10^3 Km^3/month'} ; monthly mean ; ;title = 'Northern Hemisphere'+'!C'+prefix+' '+d1_d2+'!C'+'Global Annual Mean Ice Volume (Black SOLID simulation)' title = 'Fram Strait Areal Export'+'!C'+prefix+' '+d1_d2 jpt=12 time=julday(1,15,1900)+30*lindgen(12) ;; pltt, ICE_area_export, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT,MIN = 0., MAX = .5 $ pltt, ICE_area_export, 't', 0., 15., /REMPLI, /PORTRAIT,MIN = 0., MAX = .5 $ ;; , small = [1, 2, 1], YTITLE = varunit, TITLE = title, _extra = ex , small = [1, 2, 1],YTITLE = '10^6 Km^2/month', TITLE = title, _extra = ex ; ;title ='Southern Hemisphere' +'!C'+prefix+' '+d1_d2+' - '+'!C'+'Global Annual Mean Ice Volume (Black SOLID simulation)' title = 'Fram Strait Volume Export'+'!C'+prefix+' '+d1_d2 ;; pltt, ICE_vol_export, 't', 0., 15.,19000101 ,19001231 , /REMPLI, /NOERASE , MIN = 0., MAX = .5 $ pltt, ICE_vol_export, 't', 0., 15., /REMPLI, /NOERASE , MIN = 0., MAX = .5 $ ;; , small = [1, 2, 2], YTITLE = varunit, TITLE = title, _extra = ex , small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, _extra = ex ; htmltxt = [ htmltxt, '
'+blabla, '
' ] if KEYWORD_SET(postscript) then closeps if prefix NE prefix2 then BEGIN d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')' tsave = time domdef, indx1, indx2, indy1, indy2, /xindex, /yindex,/memeindices ICE_2= rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct) ICE_thick_2 = rseries_ncdf(v2_Ithick, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct) ; domdef for V-Point in j-1 ; REALLY NOT NECESSARY, BECAUSE FLUX CAN BE COMPUTED IN J POINT, is the same domdef, indx1, indx2, indy1-1, indy2-1, /xindex, /yindex,/memeindices VN_2 = rseries_ncdf(v2_IV, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec,/nostuct) ;!! warning positive northward ;; Area export ICE_area_export_2 = (-1) * ICE_2 * VN_2.arr * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) ICE_area_export_2 = total(reform(ICE_area_export_2),1) ; in m2/s -> need to change the unit? ;; Volume export ICE_vol_export_2 = (-1) * ICE_2 * ICE_thick_2 * VN_2.arr * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt)) ICE_vol_export_2 = total(reform(ICE_vol_export_2),1) ;! in m3/s -> need to change the unit? ; needed for seasonal cycle : if jpt mod 12 ne 0 then stop nyr=jpt/12. ;; AREA ICE_area_export_2 = reform(ICE_area_export_2, 12, nyr) ICE_area_export_2 = total(ICE_area_export_2,2)/nyr ; ICE_area_export_2 = {arr:ICE_area_export_2 * 1.e-12 * 86400 * 365 , unit : '10^6 Km^2/year'} ; annual mean ICE_area_export_2 = {arr:ICE_area_export_2 * 1.e-12 * 86400 * 30 , unit : '10^6 Km^2/month'} ; monthly mean ; ICE_vol_export_2 = reform(ICE_vol_export_2, 12, nyr) ICE_vol_export_2 = total(ICE_vol_export_2,2)/nyr ; ICE_vol_export_2 = {arr:ICE_vol_export_2 * 1.e-12 * 86400 * 365 , unit : '10^3 Km^3/year'} ; annual mean ICE_vol_export_2 = {arr:ICE_vol_export_2 * 1.e-12 * 86400 * 30 , unit : '10^3 Km^3/month'} ; monthly mean ; ; if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1 title = 'Fram Strait Areal Export'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 jpt=12 time=julday(1,15,1900)+30*lindgen(12) ;; pltt, ICE_area_export.arr, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, MIN = 0., MAX = .5, window = 2 $ pltt, ICE_area_export, 't', 0., 15., /REMPLI, /PORTRAIT, MIN = 0., MAX = .5, window = 2 $ ;; , small = [1, 2, 1], YTITLE = varunit, TITLE = title, _extra = ex , small = [1, 2, 1], YTITLE = '10^6 Km^2/month', TITLE = title, _extra = ex ;; pltt, ICE_area_export_2.arr ,'t', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $ pltt, ICE_area_export_2 ,'t', 0., 15., /REMPLI, /PORTRAIT $ ;; , /ov1d, COLOR = 250, small = [1, 2, 1], YTITLE = varunit, TITLE = title, _extra = ex , /ov1d, COLOR = 250, small = [1, 2, 1],YTITLE = '10^6 Km^2/month', TITLE = title, _extra = ex ; title = 'Fram Strait Volume Export'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 ;; pltt, ICE_vol_export.arr, 't', 0., 15.,19000101 ,19001231 , /REMPLI, /NOERASE , MIN = 0., MAX = .5 $ pltt, ICE_vol_export, 't', 0., 15., /REMPLI, /NOERASE , MIN = 0., MAX = .5 $ ;; , small = [1, 2, 2], YTITLE = varunit, TITLE = title, _extra = ex , small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, _extra = ex ;; pltt, ICE_vol_export_2.arr, 't', 0., 15.,19000101 ,19001231 , /REMPLI, /NOERASE $ pltt, ICE_vol_export_2, 't', 0., 15., /REMPLI, /NOERASE $ ;; , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = varunit, TITLE = title, _extra = ex , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, _extra = ex ; htmltxt = [ htmltxt, '
'+blabla, '
' ] if KEYWORD_SET(postscript) then closeps endif domdef return end