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 2751 for trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_zonal_T.pro – NEMO

Ignore:
Timestamp:
2011-04-26T10:45:52+02:00 (13 years ago)
Author:
smasson
Message:

large update of IDL_scripts for Is-ENES

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_zonal_T.pro

    r2733 r2751  
    1 pro xxx_zonal_T, T1, T2, TLev, sEXP1, sEXP2, start_end, POSTSCRIPT = postscript, SUBBASIN = subbasin, MASK_FILENAME = mask_filename, _extra = ex 
    2    
     1pro std_plot_zonal_T, T1, T2, TLev, SUBBASIN = subbasin, POSTSCRIPT = postscript, _extra = ex 
     2 
    33  compile_opt idl2, strictarrsubs 
    44 
    5    @common 
     5@common   
     6@std_common 
    67 
    7    if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo" 
    8  
    9  
    10    if KEYWORD_SET(POSTSCRIPT) then begin 
    11       openps, '016_Zonal_T_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.ps', portrait = 1 
    12    endif 
    13  
    14                                 ; looking for longitudinal index corresponding to the highest latitude (closest to the North Pole) 
    15    index=where(gphit eq max(gphit)) 
    16    nx=index[0] mod jpi 
    17    gphi_save=gphit 
    18    gphit[0,*]=gphit[nx,*] 
    19  
    20    if KEYWORD_SET(SUBBASIN) then begin 
    21  ; save tmask 
    22       tmasksv = tmask 
    23  ;  
    24       CASE 1 of  
    25          subbasin eq 'Atl' : var = 'atlmsk_nomed' 
    26          subbasin eq 'Ind' : var = 'indmsk_nored' 
    27          subbasin eq 'Pac' : var = 'pacmsk' 
    28       ENDCASE 
    29                                 ; 
    30       msk = read_ncdf( var, filename = mask_filename, _extra =ex) 
    31  
     8  cdti3 = string(cnt, format = '(i3.3)') 
     9  print, cdti3 + ') ' + blabla 
     10  if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo" 
     11  filename = cdti3 + '_ZonalT_'+subname+'_'+std_file1_T 
     12  if std_file1_T NE std_file2_T then filename = filename + '_'+std_file2_T 
     13  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1 
     14 
     15; looking for longitudinal index corresponding to the highest latitude (closest to the North Pole) 
     16  index = where(gphit eq max(gphit)) 
     17  nx = index[0] mod jpi 
     18  gphi_save = gphit 
     19  gphit[0, *] = gphit[nx, *] 
     20; 
     21  if KEYWORD_SET(SUBBASIN) then begin 
     22    tmasksv = tmask 
     23    CASE 1 of  
     24      subbasin eq 'Atl' : var = 'atlmsk_nomed' 
     25      subbasin eq 'Ind' : var = 'indmsk_nored' 
     26      subbasin eq 'Pac' : var = 'pacmsk' 
     27    ENDCASE 
     28    msk = read_ncdf( var, filename = std_file_msksub, _extra = ex) 
    3229; from 2D array to 3D array 
    33       msk = msk.arr[*]#replicate(1., nzt) 
    34       tmask[firstxt:lastxt,firstyt:lastyt,firstzt:lastzt] = tmask[firstxt:lastxt,firstyt:lastyt,firstzt:lastzt] * msk 
    35  
    36    endif 
    37  
    38 varunit = T1.unit 
     30    msk = msk.arr[*]#replicate(1., nzt) 
     31    tmask[firstxt:lastxt, firstyt:lastyt, firstzt:lastzt] = tmask[firstxt:lastxt, firstyt:lastyt, firstzt:lastzt] * msk 
     32  endif 
    3933; 
    40   
    41    title=sEXP1+' '+subname+' / T year '+start_end 
    42    pltz, T1.arr, MININ = -2., MAXIN = 30., INTER = 1., typein = 'yz', FORMAT = '(I2)' $  
    43          , small =[ 1,2,1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra = ex  
     34  title = 'Temperature, '+subname+'!C'+std_file1_T 
     35  pltz, T1, MININ = -2., MAXIN = 30., INTER = 1., typein = 'yz', FORMAT = '(I2)' $  
     36        , small = [ 1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra = ex  
    4437;  
    45 if sEXP1 ne sEXP2 then begin 
    46  
    47   title = sEXP1+' - '+sEXP2+' T (°C) depth=105m / Temp year '+start_end 
    48   pltz, T1.arr-T2.arr, MIN = -2., MAX = 2., INTER = .2, typein = 'yz'  $ 
    49        , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra=ex 
    50  
    51 endif else begin 
    52  
    53    title=sEXP1+' - Levitus '+subname+'/ T year'+start_end 
    54    pltz, T1.arr-TLev.arr, MININ = -4., MAXIN = 4., INTER = .5, typein='yz', FORMAT = '(I2)' $ 
    55          , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex 
    56     
    57 endelse 
    58           
    59     
     38  if std_file1_T NE std_file2_T then begin 
     39    title = title+' - '+std_file2_T 
     40    pltz, T1.arr-T2.arr, MIN = -2., MAX = 2., INTER = .2, typein = 'yz', FORMAT = '(f4.1)', style = 'so0so' $ 
     41          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex 
     42  endif else begin 
     43    title = title+' - Levitus' 
     44    pltz, T1.arr-TLev.arr, MININ = -4., MAXIN = 4., INTER = .5, typein = 'yz', FORMAT = '(I2)', style = 'so0so' $ 
     45          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex 
     46  endelse 
    6047; 
    61    title = 'Temperature differences in zonal average ' + subname+' with Levitus and '+sEXP1+'-'+sEXP2 
    62    text = [   title, '<img width="80%" src=/Users/sflod/TOOLS/my_IDL/PS/'+sEXP1+'_'+sEXP2+'/ps/016_Zonal_T_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.png  />  ' ] 
    63    putfile, '/tmp/prova.txt', text 
    64  
    65  
    66    if KEYWORD_SET(POSTSCRIPT) then begin 
    67       closeps 
    68    endif 
    69  
    70    if KEYWORD_SET(SUBBASIN) then tmask = tmasksv 
    71     
    72    
    73    gphit=gphi_save 
    74  
    75  
    76    return 
     48  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ] 
     49  if KEYWORD_SET(postscript) then closeps 
     50; 
     51  if KEYWORD_SET(SUBBASIN) then tmask = tmasksv   
     52  gphit = gphi_save 
     53; 
     54  return 
    7755end 
Note: See TracChangeset for help on using the changeset viewer.