- Timestamp:
- 2011-04-26T10:45:52+02:00 (13 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_zonal_S.pro
r2733 r2751 1 pro xxx_zonal_S, S1, S2, SLev, sEXP1, sEXP2, start_end, POSTSCRIPT = postscript, SUBBASIN = subbasin, MASK_FILENAME = mask_filename, _extra = ex1 pro std_plot_zonal_S, S1, S2, SLev, SUBBASIN = subbasin, POSTSCRIPT = postscript, _extra = ex 2 2 3 3 compile_opt idl2, strictarrsubs 4 4 5 @common 5 @common 6 @std_common 6 7 7 if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo" 8 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 + '_ZonalS_'+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 9 14 10 if KEYWORD_SET(POSTSCRIPT) then begin 11 openps, '017_Zonal_S_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.ps', portrait = 1 12 endif 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, *] 13 20 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,*] 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) 29 ; from 2D array to 3D array 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 33 ; 34 title = 'Salinity, '+subname+'!C'+std_file1_T 35 pltz, S1, MININ = 32., MAXIN = 37., INTER = .2, typein = 'yz', FORMAT = '(f4.1)' $ 36 , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra = ex 37 ; 38 if std_file1_T NE std_file2_T then begin 39 title = title+' - '+std_file2_T 40 pltz, S1.arr-S2.arr, MIN = -1., MAX = 1., INTER = .1, 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, S1.arr-SLev.arr, MININ = -1, MAXIN = 1., INTER = .1, typein = 'yz', FORMAT = '(f4.1)', style = 'so0so' $ 45 , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex 46 endelse 47 ; 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 19 53 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 32 ; 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 endif 36 37 varunit = S1.unit 38 ; 39 title=sEXP1+' '+subname+' / S year '+start_end 40 pltz, S1.arr, MININ = 32., MAXIN = 37., INTER = .2, typein = 'yz' $ 41 , small = [1,2,1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra=ex 42 ; 43 if sEXP1 ne sEXP2 then begin 44 45 title = sEXP1+' - '+sEXP2+' '+subname+' / S year '+start_end 46 pltz, S1.arr-S2.arr, MIN = -1., MAX = 1., INTER = .1, typein = 'yz' $ 47 , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra=ex 48 49 endif else begin 50 51 title=sEXP1+' - Levitus '+subname+'/ S year'+start_end 52 pltz, S1.arr-SLev.arr, MININ = -1, MAXIN = 1., INTER = .1, typein = 'yz' $ 53 , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex 54 endelse 55 ; 56 title = 'Salinity differences in zonal average ' + subname +' with Levitus and '+sEXP1+'-'+sEXP2 57 text = [ title, '<img width="80%" src=/Users/sflod/TOOLS/my_IDL/PS/'+sEXP1+'_'+sEXP2+'/ps/017_Zonal_S_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.png /> ' ] 58 putfile, '/tmp/prova.txt', text 59 60 if KEYWORD_SET(POSTSCRIPT) then begin 61 closeps 62 endif 63 64 65 if KEYWORD_SET(SUBBASIN) then tmask = tmasksv 66 67 gphit=gphi_save 68 69 return 54 return 70 55 end
Note: See TracChangeset
for help on using the changeset viewer.