pro xxx_zonal_S, S1, S2, SLev, sEXP1, sEXP2, start_end, POSTSCRIPT = postscript, SUBBASIN = subbasin, MASK_FILENAME = mask_filename, _extra = ex compile_opt idl2, strictarrsubs @common if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo" if KEYWORD_SET(POSTSCRIPT) then begin openps, '017_Zonal_S_'+subname+'_'+sEXP1+'-'+sEXP2+'_y'+start_end+'.ps', portrait = 1 endif ; looking for longitudinal index corresponding to the highest latitude (closest to the North Pole) index=where(gphit eq max(gphit)) nx=index[0] mod jpi gphi_save=gphit gphit[0,*]=gphit[nx,*] if KEYWORD_SET(SUBBASIN) then begin ; save tmask tmasksv = tmask ; CASE 1 of subbasin eq 'Atl' : var = 'atlmsk_nomed' subbasin eq 'Ind' : var = 'indmsk_nored' subbasin eq 'Pac' : var = 'pacmsk' ENDCASE ; msk = read_ncdf( var, filename = mask_filename, _extra =ex) ; from 2D array to 3D array msk = msk.arr[*]#replicate(1., nzt) tmask[firstxt:lastxt,firstyt:lastyt,firstzt:lastzt] = tmask[firstxt:lastxt,firstyt:lastyt,firstzt:lastzt] * msk endif varunit = S1.unit ; title=sEXP1+' '+subname+' / S year '+start_end pltz, S1.arr, MININ = 32., MAXIN = 37., INTER = .2, typein = 'yz' $ , small = [1,2,1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra=ex ; if sEXP1 ne sEXP2 then begin title = sEXP1+' - '+sEXP2+' '+subname+' / S year '+start_end pltz, S1.arr-S2.arr, MIN = -1., MAX = 1., INTER = .1, typein = 'yz' $ , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra=ex endif else begin title=sEXP1+' - Levitus '+subname+'/ S year'+start_end pltz, S1.arr-SLev.arr, MININ = -1, MAXIN = 1., INTER = .1, typein = 'yz' $ , small = [1,2,2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex endelse ; title = 'Salinity differences in zonal average ' + subname +' with Levitus and '+sEXP1+'-'+sEXP2 text = [ title, ' ' ] putfile, '/tmp/prova.txt', text if KEYWORD_SET(POSTSCRIPT) then begin closeps endif if KEYWORD_SET(SUBBASIN) then tmask = tmasksv gphit=gphi_save return end