wiki:Doc/Chap3

Version 4 (modified by kolasinski, 16 years ago) (diff)

--

Chap.3 : File plt_def.pro

The file 'plt_def.pro' is important because it sets some global variables declared in com_eg.pro. If you want to add a new global varaible, you'll have to modify com_eg.pro and plt_def.pro.

  • 'box_h' : It will define the area read in the netcdf file.
    ; horizontal domain
    box_h = [20,380,-30,30]
    
  • 'glamboundary_box' : the longitudes range shown on the plot is set with this parameter. In that case, the first longitude shown on the left is 20° and the last one is 380° (360°+20°).
    glamboundary_box = [20, 380]  
    
  • Those parameters set the limits for the ocean models in depth and for the atmospheric models in altitude (pressure).
    ; vertical domain
    depth_z = 5000 
    zoom_z = 400
    hpa_min = 10
    hpa_max = 500     
    
  • 'msf_mean' : Useful for the computation of the meridional stream function in the macro (make_msf2.pro). Keyword used for the definition of the dimensions of the computed data.
    msf_mean =  0   
    
  • Those parameters define the the boxes on which the average is made.
    ; vert_type = 'level'          ;  'z' for depth/altitude or 'level' or '0' for nothing
    vert_type = '0'
    vert_mean = [1, 1]   ; [depth1,depth2] or [level1,level2] in C notation 0-jpk-1     
    
  • Useful for density projection plots ('xs', 'ys', 's_', 'st' plot types).
     ; density domain (sigma) + delta sigma
    sig_min = 20.
    sig_max = 27.
    sig_del = 0.2
    sig_bowl =  0   ; 0/1 bowl overlay on density binned plots  
    
  • Useful when comparing time-series on the same plot.
    ; cross-correlation and normalisation:
    c_normal = 0       ; normalise data serie
    c_correl =  1      ; when overlay of 1d curves : 0/1 
    lag_correl = 12L    ; bound for lagged-correlation [-lag_correl,..,0,...,lag_correl]  
    
  • Useful when studying the seasonal inter-annual variability for a given field. It is used in the macro make_stddev.pro
    ; standard deviation
    stddev_diff = 0       ; 0/1 (if = 1 makes a difference between the
                          ; std dev for a given month and the std dev of the whole time serie)
                          ; Active with the make_stddev macro for a given month (ex : @@sosstdev_01 for
                          ; sst std dev only for January)  
    
; axis
; ----
;  lat_axis : latitudinal axis : 'reg'ular or 'sin'us latitude
   lat_axis = 'reg'     
; min /max
; --------
;  free minmax in 1D-plots (yes) or take fld_glo_mmx.def value (no) [yes]
free_1d_minmax = 'no'
  • Useful parameters for hovmoeller plots :
    ; Hovmoellers
    ; -----------
    ;  trend_typ : 0 no trend
    ;              1 remove initial value to serie (trend)
    ;              2 remove previous value to current (drift)
    ;              3[<n>] remove serie to mean of <n> final values (inverse trend)
    ;              4[<n>] remove [n]-average running mean of serie (anomaly)
    ;                   for monthly serie use <n>=12 to remove mean
    ;                   seasonal cycle
    ;      this value can be field-overriden by specifying @t<trend_typ> after
    ;      timave in post-it line
    ;              6[<n>] time integral of field activation. <n> is the
    ;              number of previous time steps to integrate from
    ;              (default is from beginning of time serie)
    ;
    ;
    ;  field_int : field time integral (0/1)
    ;  nb_cycles : number of repeated cycles for seasonal time series
    ;  def_stride : default stride in hovmoeller sampling (see domain_boxes.def)
    
       trend_typ = '0'
       field_int = 0
       nb_cycles = 2
       def_stride = 1
       asciidir = homedir+'out/ascii_out/'     
    
  • 'calendar_type' : models usually have 360 days per year e.g. 30 days per month. But some other models are a bit more complex and use more realistic calendars.
    ;  calendar type
    ;          0: 365 days/year
    ;          1: gregorian
    ;          N: N days per month
    ;
    calendar_type = 30
    
  • These parameters define some garphical options, whether you want a color palette or a black and white palette and if you want to put the colorbar on the plot or not.
    ; shading : (fill) 1/0
    ; pal_type: 'bw', 'col', '2dom' (2dom = read 2 domains in isolignes - ISOSP)
    ; grey_shade: % of black for 2dom case
    ; grey_shade_1/2: % of black for 2dom case : difference plots (-/+)
    ; col_palette: 'yes' or 'no' (put colorbar or not)
    ;
       shading = 1
       pal_type = 'col'
       grey_shade = 20
       grey_shade_1 = 5
       grey_shade_2 = 20
       col_palette = 'yes'
    
  • 'cont_fill' defines whether you want to mask the continents or not. And 'cont_real' is a keyword which sets the real continents or not.
    cont_fill = 1         ; continent fill for atmosphere grids (1/0)
    cont_real = 0         ; draw real continents (0)
                          ; = 0 (no real continents drawn)
                          ; = 1 (real continents drawn instead of the mask)
                          ; = 2 (mask + real continents drawn)
    
  • 'vector_sample' defines the way vectors are shown on a vector plot. In that case, it will draw one vector out of two.
    vector_sample = 2     ; vector sampling (1)
    ;;
    
  • Those parameters defines the thickness, the style and the colors of 1D curves. Have a look on the on-line help of IDL (search for 'Line Annotation Properties' and 'Graphics keywords (collected)' in the 'Index' panel).
       line_thick = [2,2,2,2,2,2,2,2]   ; 1D plot line thickness (for each overlay curves)
       line_style = [1,1,1,1,2,2,3,3]   ; 1D plot line style (for each overlay curves)
       line_color = [1,2,3,4,6,7,7,8]   ; 1D plot line color (for each overlay curves)
    ; 1=black; 2=red; 3=green; 4=blue; 6=purple
    ; 43 ---- 90 ---- 160 ---- 190 ---- 210 ---- 254
    ; blue    turq    green    yell     orange   red
    
  • Those parameters are important for y=f(next) plots (for instance, zonal winds anomalies averaged on Nino_4 box over SST anomalies averaged on Nino_3 box).
       symbol_families = '1'         ; 4x3 number of colors in time symbol plots (modulo)
                                    ; use <n> or <n>x<m> (n same colors, modulo nxm)
       symbol_families = '4x3'
    ;;   symbol_families = '12x1'
       symbol_style = [1,1,1,1,2,2,1,1,1,1,1,1]   ; Symbol style (for each overlay symbol)
       symbol_color = [1,2,3,4,2,3,7,8,9,10,11,12]   ; Symbol line color (for each overlay symbol)
       mean_sc_only = 0
    ;;   mean_sc_only = 4   ; 1 = Only plot mean SC in yfx when symbol_families='4x3' and hotyp=t
                          ; 2 = Only plot SC of std dev when symbol_families='4x3' and hotyp=t
                          ;      (require 1m@t412)
                          ; 4 = Only plot ICS per month + errorbar when symbol_families='12x1'
    
    
  • 'look' defines how the drawn axis look like. And 'contour_options' defines whether you want to draw the contours or not.
    ; Graphic keywords for axis, contours
    ;;   contour_options = ',/nocontour'	;;;;;; include this line to delete contour labels
     contour_options = ',cell_fill=2'     ;;;;;; include this line to include contour label   
     look = ',linestyle=0,xthick=2,ythick=2,zthick=2,sepdate='' '''
    
  • When 'fill_space' is set, it forces the plot the occupy the maximum space allowed. 'marge_option' may be used to reduce blank space between legends or plots of the same window. And 'title_type' defines whether you want to draw the titles and subtitles or not.
    ; Use of page space and titles
    ; marge_option : add or reduce marge around the plot ; suitable for
    ;                optimizing space when several plots on the same
    ;                window. See title_type and titles keyword below to
    ;                set it
    fill_space = 1        ; fill space on plot (0/1) (/rempli option) ?
    marge_option = 'marge=[0,0,2,2]' ; (use [0, 0, -2, -2] to fill up even more space
    title_type = 'TS'      ; default type of titles 
                           ; 'T' for title only, 'S' for subtitle only
                           ; 'TS' for both 
                           ; 'off' for no titles
    xchartxt = 1.0        ; x axis font size (1.0)
    ychartxt = 1.0        ; y axis font size (1.0)
    
  • 'default_txt_format' defines by default the legend to write along each 1D curve. In that case, the name of the experiment will discriminate the different curves. If you want to specify more information, you have to add a string of characters behind the '1o'
    default_txt_format = 'E' ; default text in legend for 1D plots (E)xperiment(V)ariable[L]ong name[U]nits(B)ox