New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 4320 for branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_ICE.pro – NEMO

Ignore:
Timestamp:
2013-11-28T12:41:27+01:00 (10 years ago)
Author:
flavoni
Message:

update IDL_scripts for ORCA2_LIM and ORCA2_LIM3, add plot of max_mld output 5days, see ticket: #724

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_ICE.pro

    r2751 r4320  
    1 pro std_ts_ICE, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex 
     1function read_arr2d, filename, varname, t1, t2 
     2;; function that read input file and return 2d array with monthly timecounter  
     3nyear = (t2-t1+1)/12 
     4arr2d = ncdf_lec(filename, VAR=varname) 
     5arr2d = arr2d[t1:t2] 
     6arr2d = reform(arr2d,12,nyear) ; put in 2D array 
     7arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years) 
     8 
     9return, arr2d 
     10end  
     11 
     12;; here start procedure that use function read_arr2d   
     13pro std_ts_ICE, masknp, s_iodir_data,  POSTSCRIPT = postscript, _extra = ex 
    214 
    315  compile_opt idl2, strictarrsubs 
     
    1022; get exp2 info 
    1123  vICE2 = getenv('VAR2_ICE')   &   prefix2 = getenv('V2ICE_PREF')   &   suffix2 = getenv('V2ICE_SUFF') 
     24; get ice climatology info 
     25  std_file_ice =  isafile(getenv('FILE_ICE'), title = 'ICE Extent Climatology', iodir = std_iodir_climato) 
    1226; 
     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) 
     31  t1 = t1[0] ;  jannuary 
     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 
    1341  cdti3 = string(cnt, format = '(i3.3)') 
    1442  print, cdti3 + ') ' + blabla 
    15   filename = cdti3 + '_ts_AMOC_'+prefix 
     43  filename = cdti3 + '_ts_ICE_'+prefix 
    1644  if prefix NE prefix2 then filename = filename + '_'+prefix2 
    17   if KEYWORD_SET(postscript) then openps, filename+'_1.ps', portrait = 1 
     45  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1 
    1846; 
    1947  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')' 
    2048; 
    2149  iodir = std_iodir_data 
     50  ; ICE Area in NORTH Hemisphere 
     51  domdef, 0, jpi-1, 30, 90, /xindex 
     52  ICE_N = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec) 
     53  ICE_N = grossemoyenne(ICE_N.arr, 'xy', /integration, mask2d = masknp) 
    2254 
    23   domdef, 0, jpi-1, 30, 90, /xindex 
    24   ICE_N = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, direc = 'xy', /integration, mask2d = masknp) 
    25   ICE_N.arr = ICE_N.arr * 1.e-12   &   ICE_N.unit = '10^12 m^2' 
    26   domdef, 0, jpi-1, -90, -30, /xindex 
    27   ICE_S = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, direc = 'xy', /integration, mask2d = masknp) 
    28   ICE_S.arr = ICE_S.arr * 1.e-12   &   ICE_S.unit = '10^12 m^2' 
     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'} 
    2960 
    30   title = prefix+' '+d1_d2+'!C'+'Global Annual Mean Ice Area (North. Hemisp.)' 
    31   pltt, ICE_N, 't', 0., 15., date1, date2, /REMPLI, /PORTRAIT $ 
     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  ; 
     90  title = 'Northern Hemisphere'+'!C'+prefix+' '+d1_d2+'!C'+' Global Annual Mean Ice Area (Black SOLID simulation)'+'!C'+ 'and Extend minus 15% (Blue SOLID simulation)'+'!C'+'Observation (dashed)' 
     91  jpt=12 
     92  time=julday(1,15,1900)+30*lindgen(12) 
     93  pltt, ICE_N, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT,MIN = 4., MAX = 16. $ 
    3294        , small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
    33    
    34   title = prefix+' '+d1_d2+'!C'+'Global Annual Mean Ice Area (South. Hemisp.)' 
    35   pltt, ICE_S, 't', 0., 15., date1, date2, /REMPLI, /NOERASE $ 
     95  pltt, ICE_N_15, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $ ; dashed lines is LINESTYLE=2  $ 
     96        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex  
     97  pltt, vICE_area_NH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     98         , /ov1d, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     99  pltt, vICE_ext_NH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     100        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     101; 
     102  title ='Southern Hemisphere !C'+prefix+' '+d1_d2+' - '+'!C'+'Global Annual Mean Ice Area (Black SOLID simulation)'+'!C'+ 'and Extend minus 15% (Blue SOLID simulation)'+'!C'+'Observation (dashed)' 
     103  pltt, ICE_S, 't', 0., 15.,19000101 ,19001231 , /REMPLI, /NOERASE , MIN = 0., MAX = 20. $ 
    36104        , small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
    37    
    38   htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_1.png  />  ' ] 
     105  pltt, ICE_S_15, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT $  
     106        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex  
     107  pltt,  vICE_area_SH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     108         , /ov1d, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     109  pltt,  vICE_ext_SH, 't', 0., 15., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     110        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     111; 
     112  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ] 
    39113  if KEYWORD_SET(postscript) then closeps 
    40114 
     
    42116 
    43117    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')' 
    44  
    45118    tsave = time 
    46119    domdef, 0, jpi-1, 30, 90, /xindex 
    47     ICE_N2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, direc = 'xy', /integration, mask2d = masknp) 
    48     ICE_N2.arr = ICE_N2.arr * 1.e-12   &   ICE_N2.unit = '10^12 m^2' 
    49     domdef, 0, jpi-1, -90, -30, /xindex 
    50     ICE_S2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, direc = 'xy', /integration, mask2d = masknp) 
    51     ICE_S2.arr = ICE_S2.arr * 1.e-12   &   ICE_S2.unit = '10^12 m^2' 
    52     time = tsave   &   IF n_elements(time) NE jpt THEN stop 
     120    ;ICE Extent in NORTH Hemisphere 
     121    ICE_N2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) 
     122    ICE_N2 = grossemoyenne(ICE_N2.arr, 'xy', /integration, mask2d = masknp) 
     123    if jpt mod 12 ne 0 then stop 
     124    nyr=jpt/12. 
     125    ICE_N2 = reform(ICE_N2, 12,nyr) 
     126    ICE_N2 = total(ICE_N2,2)/nyr 
     127    ICE_N2 = {arr:ICE_N2 * 1.e-12, unit : '10^12 m^2'} 
     128    ;ICE Extent minus 15% in NORTH Hemisphere 
     129    ICE_N2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) 
     130    msk = ICE_N2_15.arr gt 0.15  ; remove 0.15% for observations 
     131    ICE_N2_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp) 
     132    if jpt mod 12 ne 0 then stop 
     133    nyr=jpt/12. 
     134    ICE_N2_15 = reform(ICE_N2_15, 12,nyr) 
     135    ICE_N2_15 = total(ICE_N2_15,2)/nyr 
     136    ICE_N2_15 = {arr:ICE_N2_15 * 1.e-12, unit : '10^12 m^2'} 
     137    ;ICE Extent in SOUTH Hemisphere 
     138    domdef, 0, jpi-1, -90, -30, /xindex  
     139    ICE_S2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) 
     140    ICE_S2 = grossemoyenne(ICE_S2.arr, 'xy', /integration, mask2d = masknp) 
     141    if jpt mod 12 ne 0 then stop 
     142    nyr=jpt/12. 
     143    ICE_S2 = reform(ICE_S2, 12,nyr) 
     144    ICE_S2 = total(ICE_S2,2)/nyr 
     145    ICE_S2 = {arr:ICE_S2 * 1.e-12, unit : '10^12 m^2'} 
     146    ;ICE Extent minus 15% in SOUTH Hemisphere 
     147    ICE_S2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec) 
     148    msk = ICE_S2_15.arr gt 0.15  ; remove 0.15% for observations 
     149    ICE_S2_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp) 
     150    if jpt mod 12 ne 0 then stop 
     151    nyr=jpt/12. 
     152    ICE_S2_15 = reform(ICE_S2_15, 12,nyr) 
     153    ICE_S2_15 = total(ICE_S2_15,2)/nyr 
     154    ICE_S2_15 = {arr:ICE_S2_15 * 1.e-12, unit : '10^12 m^2'} 
     155  ; 
     156 ;   time = tsave   &   IF n_elements(time) NE jpt THEN stop 
    53157 
    54158    if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1 
    55159 
    56     title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Global Annual Mean Ice Area (North. Hemisp.)' 
    57     pltt, ICE_N.arr - ICE_N2.arr, 't', -2., 2., date1, date2, /REMPLI, /PORTRAIT, window = 2 $ 
    58           , COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
    59      
    60     title = prefix+' '+d1_d2+' - '+prefix2+' '+d1_d2_2+'!C'+'Global Annual Mean Ice Area (South. Hemisp.)' 
    61     pltt, ICE_S.arr - ICE_S2.arr, 't', -2., 2., date1, date2, /REMPLI, /NOERASE $ 
    62           , COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     160 
     161  title = 'Northern Hemisphere'+'!C'+prefix+' - '+prefix2+' '+d1_d2_2+'!C'+' Global Annual Mean Ice Area (BLUE)'+'!C'+ 'and Extend minus 15% (RED)' 
     162  jpt=12 
     163  time=julday(1,15,1900)+30*lindgen(12) 
     164  pltt, ICE_N.arr - ICE_N2.arr, 't', -.2, .2, 19000101, 19001231, /REMPLI, /PORTRAIT, window = 2 $ 
     165        , COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     166  pltt, ICE_N_15.arr -  ICE_N2_15.arr , 't', -.2, .2, 19000101, 19001231, /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $ 
     167        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex  
     168;SF  pltt, vICE_area_NH, 't', -2., 2., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     169;SF        , /ov1d, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     170;SF  pltt, vICE_ext_NH, 't', -2., 2., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     171;SF        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     172; 
     173;  title ='Southern Hemisphere'+'!C'+prefix+' - '+prefix2+' '+d1_d2_2+' - '+'!C'+'Global Annual Mean Ice Area (BLUE)'+'!C'+ 'and Extend minus 15% (RED)' 
     174  title ='Southern Hemisphere'+'!C' 
     175  pltt, ICE_S.arr - ICE_S2.arr, 't', -2., 2., 19000101, 19001231, /REMPLI, /NOERASE $ 
     176         , COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     177  pltt, ICE_S_15.arr -  ICE_S2_15.arr , 't', -2., 2., 19000101, 19001231, /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $ 
     178        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     179;SF  pltt,  vICE_area_SH, 't', -2., 2., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     180;SF         , /ov1d, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     181;SF  pltt,  vICE_ext_SH, 't', -2., 2., 19000101, 19001231, /REMPLI, /PORTRAIT, LINESTYLE=2 $  
     182;SF        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
     183; 
    63184 
    64185    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ] 
Note: See TracChangeset for help on using the changeset viewer.