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.
std_plot_zonal_S.pro in trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts – NEMO

source: trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_zonal_S.pro @ 2751

Last change on this file since 2751 was 2751, checked in by smasson, 13 years ago

large update of IDL_scripts for Is-ENES

File size: 2.2 KB
Line 
1pro std_plot_zonal_S, S1, S2, SLev, SUBBASIN = subbasin, POSTSCRIPT = postscript, _extra = ex
2
3  compile_opt idl2, strictarrsubs
4
5@common 
6@std_common
7
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
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)
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
53
54  return
55end
Note: See TracBrowser for help on using the repository browser.