Changeset 205


Ignore:
Timestamp:
01/26/10 10:46:13 (14 years ago)
Author:
pinsard
Message:

homegenize THEN BEGIN ... ENDIF

Location:
trunk/procs
Files:
78 edited

Legend:

Unmodified
Added
Removed
  • trunk/procs/add_txt_pltt.pro

    r203 r205  
    22; 
    33; define additional text for <pro>pltt</pro> 
     4; 
     5; TODO 
     6; ==== 
     7; 
     8; should be a function 
    49; 
    510; @version 
     
    1924            ; anomaly 
    2025               IF strmid(cmd.trend, 0, 1) EQ '4' THEN BEGIN 
    21                   IF strmid(cmd.trend, 1, strlen(cmd.trend)-1) EQ 12 THEN $ 
    22                    filleg = filleg+'  [seasonal anomaly n=12]' ELSE $ 
     26                  IF strmid(cmd.trend, 1, strlen(cmd.trend)-1) EQ 12 THEN BEGIN 
     27                   filleg = filleg+'  [seasonal anomaly n=12]' 
     28                  ENDIF ELSE BEGIN 
    2329                   filleg = filleg+'  [n='+strmid(cmd.trend, 1, strlen(cmd.trend)-1)+ ' anomaly]' 
     30                  ENDELSE 
    2431               ENDIF 
    2532            ; integral 
  • trunk/procs/ajoutvectz.pro

    r203 r205  
    140140;------------------------------------------------------------ 
    141141   CASE type OF 
    142       'yz': IF grilleu EQ '' then grilleu = 'V' 
    143       'xz': IF grilleu EQ '' then grilleu = 'U' 
    144       ELSE: IF grilleu EQ '' then grilleu = 'V' 
     142      'yz': IF grilleu EQ '' THEN BEGIN 
     143             grilleu = 'V' 
     144            ENDIF 
     145      'xz': IF grilleu EQ '' THEN BEGIN 
     146             grilleu = 'U' 
     147            ENDIF 
     148      ELSE: IF grilleu EQ '' THEN BEGIN 
     149             grilleu = 'V' 
     150            ENDIF 
    145151   ENDCASE 
    146    IF grillew EQ '' then grillew = 'W' 
    147  
    148    IF grilleu EQ 'T' AND grillew EQ 'T' THEN interpolle = 0 ELSE interpolle = 1 
     152   IF grillew EQ '' THEN BEGIN 
     153    grillew = 'W' 
     154   ENDIF 
     155 
     156   IF grilleu EQ 'T' AND grillew EQ 'T' THEN BEGIN 
     157    interpolle = 0 
     158   ENDIF ELSE BEGIN 
     159    interpolle = 1 
     160   ENDELSE 
    149161 
    150162;------------------------------------------------------------ 
    151163; on trouve les points que u et v ont en communs 
    152164;------------------------------------------------------------ 
    153    if interpolle then begin 
     165   if interpolle THEN BEGIN 
    154166      CASE type OF 
    155167         'yz': indicehx = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
     
    179191; extraction de u et v sur le domaine qui convient 
    180192;------------------------------------------------------------ 
    181       if nxh NE nx then $ 
    182        if indicex[0] EQ firsth then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 
    183       IF nxt NE nx THEN $ 
    184        if indicex[0] EQ firstxt then w = w[0:nx-1, *] ELSE w = w[1: nx, *] 
    185       IF nzt NE nz THEN $ 
    186        if indicez[0] EQ firstzt then u = u[*, 0:nz-1] ELSE u = u[*, 1: nz] 
    187       IF nzw NE nz THEN $ 
    188        if indicez[0] EQ firstzw then w = w[*, 0:nz-1] ELSE w = w[*, 1: nz] 
     193      if nxh NE nx THEN BEGIN 
     194       if indicex[0] EQ firsth THEN BEGIN 
     195        u = u[0:nx-1, *] 
     196       ENDIF ELSE BEGIN 
     197        u = u[1: nx, *] 
     198       ENDELSE 
     199      ENDIF 
     200      IF nxt NE nx THEN BEGIN 
     201       if indicex[0] EQ firstxt THEN BEGIN 
     202        w = w[0:nx-1, *] 
     203       ENDIF ELSE BEGIN 
     204        w = w[1: nx, *] 
     205       ENDELSE 
     206      ENDIF 
     207      IF nzt NE nz THEN BEGIN 
     208       if indicez[0] EQ firstzt THEN BEGIN 
     209        u = u[*, 0:nz-1] 
     210       ENDIF ELSE BEGIN 
     211        u = u[*, 1: nz] 
     212       ENDELSE 
     213      ENDIF 
     214      IF nzw NE nz THEN BEGIN 
     215       if indicez[0] EQ firstzw THEN BEGIN 
     216        w = w[*, 0:nz-1] 
     217       ENDIF ELSE BEGIN 
     218        w = w[*, 1: nz] 
     219       ENDELSE 
     220      ENDIF 
    189221;------------------------------------------------------------------ 
    190222; on reform u et w pour s'assurer qu'aucune dimension n'a ete ecrasee 
    191223;------------------------------------------------------------------ 
    192       if nz EQ 1 then begin 
     224      if nz EQ 1 THEN BEGIN 
    193225         u = reform(u, nx, nz) 
    194226         w = reform(w, nx, nz) 
     
    199231 
    200232      terre = where(u GE valmask/10.) 
    201       IF terre[0] NE -1 THEN u[terre] = !VALUES.F_NAN 
     233      IF terre[0] NE -1 THEN BEGIN 
     234       u[terre] = !VALUES.F_NAN 
     235      ENDIF 
    202236      terre = where(w GE valmask/10.) 
    203       IF terre[0] NE -1 THEN w[terre] = !VALUES.F_NAN 
     237      IF terre[0] NE -1 THEN BEGIN 
     238       w[terre] = !VALUES.F_NAN 
     239      ENDIF 
    204240 
    205241      a=u[0,*] 
     
    217253; tracer qu'un vecteur sur 
    218254;----------------------------------------------------------- 
    219    if keyword_set(unvectsur) then BEGIN ; 
     255   if keyword_set(unvectsur) THEN BEGIN 
    220256; indx est un vecteur contenant les numero des colonnes a selectionner 
    221257; indz est un vecteur contenant les numero des lignes a selectionner 
    222       if n_elements(unvectsur) EQ 1 then begin 
     258      if n_elements(unvectsur) EQ 1 THEN BEGIN 
    223259         indx = where((lindgen(nx) MOD unvectsur[0]) eq 0) 
    224260         indz = where((lindgen(nz) MOD unvectsur[0]) eq 0) 
     
    280316 
    281317sortie: 
    282    if keyword_set(key_performance) NE 0 THEN print, 'temps ajoutvectz', systime(1)-tempsun 
    283 end 
    284  
    285  
     318   if keyword_set(key_performance) NE 0 THEN BEGIN 
     319    print, 'temps ajoutvectz', systime(1)-tempsun 
     320   ENDIF 
     321 
     322END 
  • trunk/procs/bining2.pro

    r203 r205  
    240240 
    241241 
    242          IF i_ocean[0] NE -1 THEN BEGIN ; on n entre que si il y a des points ocean 
     242         IF i_ocean[0] NE -1 THEN BEGIN 
     243; on n entre que si il y a des points ocean 
    243244;            print, 'ocean point' 
    244245            i_bottom = i_ocean[n_elements[i_ocean]-1] 
     
    267268            i_max = i_max[0] 
    268269;            print, 'i_min, i_max', i_min, i_max 
    269 ;IF i_min GT i_max THEN print, 'WARNING: i_min, i_max=', i_min, i_max, ' at i,j=,', i, j 
     270;IF i_min GT i_max THEN BEGIN 
     271; print, 'WARNING: i_min, i_max=', i_min, i_max, ' at i,j=,', i, j 
     272;ENDIF 
    270273;   on prend le plus grand des indices min 
    271274 
    272 ;            IF i_max GE jpk-1 THEN print, i, j, i_max 
    273 ;            IF i_min LE 1 THEN print, i, j, i_min 
     275;            IF i_max GE jpk-1 THEN BEGIN 
     276;             print, i, j, i_max 
     277;            ENDIF 
     278;            IF i_min LE 1 THEN BEGIN 
     279;             print, i, j, i_min 
     280;            ENDIF 
    274281 
    275282; Si la valeur du niveau (s_s) est plus faible que la densite de surface, 
     
    280287            ind = where(s_s LT s_z[i_min]) 
    281288            IF ind[0] NE -1 THEN BEGIN 
    282 ;               IF i_min GT i_max THEN print, 'min reached at sigma indices', ind 
     289;               IF i_min GT i_max THEN BEGIN 
     290;                print, 'min reached at sigma indices', ind 
     291;               ENDIF 
    283292               z_s[ind] = 0 
    284293               c1_s[ind] = !VALUES.F_NAN 
     
    292301 
    293302            IF ind[0] NE -1 THEN BEGIN 
    294 ;               IF i_min GT i_max THEN print, 'max reached at sigma indices', ind 
     303;               IF i_min GT i_max THEN BEGIN 
     304;                print, 'max reached at sigma indices', ind 
     305;               ENDIF 
    295306               z_s[ind] = z_s[N_s] 
    296307               c1_s[ind] = c1_s[N_s] 
     
    299310; cas general 
    300311            ind = where( (s_s GE s_z[i_min]) AND (s_s LE s_z[i_max]) ) 
    301 ;            IF i_min GT i_max THEN print, 's_s indices inside min/max', ind 
     312;            IF i_min GT i_max THEN BEGIN 
     313;             print, 's_s indices inside min/max', ind 
     314;            ENDIF 
    302315            IF ind[0] NE -1 THEN BEGIN 
    303316               i_profil = i_ocean[i_min:i_max] ; problem line 
  • trunk/procs/colorbartv.pro

    r203 r205  
    202202    ENDIF ELSE ncolors = !D.N_COLORS 
    203203ENDIF 
    204 IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 0B 
    205 IF N_ELEMENTS(charsize) EQ 0 THEN charsize = 1.0 
    206 IF N_ELEMENTS(format) EQ 0 THEN format = '(F8.2)' 
    207 IF N_ELEMENTS(color) EQ 0 THEN color = ncolors - 1 + bottom 
    208 IF N_ELEMENTS(min) EQ 0 THEN min = 0.0 
    209 IF N_ELEMENTS(max) EQ 0 THEN max = FLOAT(ncolors) - 1 
    210 IF N_ELEMENTS(divisions) EQ 0 THEN divisions = 2 
    211 IF N_ELEMENTS(title) EQ 0 THEN title = '' 
     204IF N_ELEMENTS(bottom) EQ 0 THEN BEGIN 
     205 bottom = 0B 
     206ENDIF 
     207IF N_ELEMENTS(charsize) EQ 0 THEN BEGIN 
     208 charsize = 1.0 
     209ENDIF 
     210IF N_ELEMENTS(format) EQ 0 THEN BEGIN 
     211 format = '(F8.2)' 
     212ENDIF 
     213IF N_ELEMENTS(color) EQ 0 THEN BEGIN 
     214 color = ncolors - 1 + bottom 
     215ENDIF 
     216IF N_ELEMENTS(min) EQ 0 THEN BEGIN 
     217 min = 0.0 
     218ENDIF 
     219IF N_ELEMENTS(max) EQ 0 THEN BEGIN 
     220 max = FLOAT(ncolors) - 1 
     221ENDIF 
     222IF N_ELEMENTS(divisions) EQ 0 THEN BEGIN 
     223 divisions = 2 
     224ENDIF 
     225IF N_ELEMENTS(title) EQ 0 THEN BEGIN 
     226 title = '' 
     227ENDIF 
    212228pscolor = KEYWORD_SET(pscolor) 
    213229 
    214230IF KEYWORD_SET(vertical) THEN BEGIN 
    215    IF KEYWORD_SET(discret) THEN begin 
     231   IF KEYWORD_SET(discret) THEN BEGIN 
    216232       facteur=256/n_elements(discret) 
    217233    discret=reform(replicate(1,facteur) # discret,facteur*n_elements(discret)) 
    218234       bar = REPLICATE(1B,10) # discret 
    219235   endif else  bar = REPLICATE(1B,10) # BINDGEN(256) 
    220    IF N_ELEMENTS(position) EQ 0 THEN position = [0.88, 0.15, 0.95, 0.95] 
     236   IF N_ELEMENTS(position) EQ 0 THEN BEGIN 
     237    position = [0.88, 0.15, 0.95, 0.95] 
     238   ENDIF 
    221239ENDIF ELSE BEGIN 
    222    IF KEYWORD_SET(discret) THEN begin 
     240   IF KEYWORD_SET(discret) THEN BEGIN 
    223241       facteur=256/n_elements(discret) 
    224242    discret=reform(replicate(1,facteur) # discret,facteur*n_elements(discret)) 
    225243       bar = discret # REPLICATE(1B,10) 
    226244   endif else bar = BINDGEN(256) # REPLICATE(1B, 10) 
    227    IF N_ELEMENTS(position) EQ 0 THEN position = [0.15, 0.88, 0.95, 0.95] 
     245   IF N_ELEMENTS(position) EQ 0 THEN BEGIN 
     246    position = [0.15, 0.88, 0.95, 0.95] 
     247   ENDIF 
    228248ENDELSE 
    229249 
    230250   ; Scale the color bar. 
    231 IF NOT KEYWORD_SET(discret) THEN $ 
     251IF NOT KEYWORD_SET(discret) THEN BEGIN 
    232252 bar = BYTSCL(bar, TOP=ncolors-1) + bottom 
     253ENDIF 
    233254 
    234255   ; Get starting locations in DEVICE coordinates. 
     
    320341   ; Restore color variable if changed for PostScript. 
    321342 
    322 IF postScriptDevice AND (pscolor NE 1) THEN color = oldcolor 
    323  
     343IF postScriptDevice AND (pscolor NE 1) THEN BEGIN 
     344 color = oldcolor 
     345ENDIF 
    324346END 
  • trunk/procs/compute_time.pro

    r203 r205  
    265265         END 
    266266      ENDCASE 
    267       IF date1 EQ date2 THEN count = 1 
     267      IF date1 EQ date2 THEN BEGIN 
     268       count = 1 
     269      ENDIF 
    268270      timearr = {count: count, scale: time} 
    269271      return, timearr 
  • trunk/procs/data_read.pro

    r203 r205  
    261261         read = 1 
    262262         IF strpos(cmd.plt, '#') NE -1 THEN BEGIN 
    263             IF  cmd.plt EQ cmd_prev.plt THEN BEGIN ; not same zoom 
     263            IF cmd.plt EQ cmd_prev.plt THEN BEGIN 
     264               ; not same zoom 
    264265               fldr = field 
    265266               read = 0 
     
    306307   ncdf_db = def_dbase(cmd.exp) 
    307308 
    308    IF debug_w THEN print, '       varexp defined in data_read = ', varexp 
     309   IF debug_w THEN BEGIN 
     310    print, '       varexp defined in data_read = ', varexp 
     311   ENDIF 
    309312 
    310313; define file name 
     
    333336   small_domain = cmd.plt 
    334337   CASE n_elements(box_plot) OF 
    335       4 : IF vert_switch GE 1 THEN box_plot = [box_plot, vert_mean] 
    336       6 : IF vert_switch GE 1 THEN box_plot = [box_plot[0:3], vert_mean] ELSE box_plot = box_plot[0:3] 
     338      4 : IF vert_switch GE 1 THEN BEGIN 
     339           box_plot = [box_plot, vert_mean] 
     340          ENDIF 
     341      6 : IF vert_switch GE 1 THEN BEGIN 
     342           box_plot = [box_plot[0:3], vert_mean] 
     343          ENDIF ELSE BEGIN 
     344           box_plot = box_plot[0:3] 
     345          ENDELSE 
    337346   ENDCASE 
    338347 
    339348; Exceptions : need to read all the vertical data (and not a subset) 
    340349; for the pltz case. Other cases ? 
    341    IF plttyp EQ 'pltz' THEN box_plot = box_plot[0:3] 
    342  
     350   IF plttyp EQ 'pltz' THEN BEGIN 
     351    box_plot = box_plot[0:3] 
     352   ENDIF 
    343353; define timesteps time1 and time2 
    344354 
     
    349359      time = timearr.scale 
    350360   ENDIF ELSE BEGIN 
    351       IF strpos(cmd.timave, 'mm') NE -1 THEN time1 = delta_t1+long(strmid(cmd.date1, 0, 2)) $ 
    352       ELSE  time1 = delta_t1+1 
     361      IF strpos(cmd.timave, 'mm') NE -1 THEN BEGIN 
     362       time1 = delta_t1+long(strmid(cmd.date1, 0, 2)) 
     363      ENDIF ELSE BEGIN 
     364       time1 = delta_t1+1 
     365      ENDELSE 
    353366      time2 = time1 
    354367      time = time1 
     
    364377   CASE STRMID(cmd.var, 0, 2) OF 
    365378      '@@': BEGIN 
    366          IF debug_w THEN print, 'keyword_set(all_data) : ', keyword_set(all_data) 
     379         IF debug_w THEN BEGIN 
     380          print, 'keyword_set(all_data) : ', keyword_set(all_data) 
     381         ENDIF 
    367382         fldr = macro_read(file_name, cmd.var, ncdf_db, BOXZOOM = box_plot, TIME_1 = time1, TIME_2 = time2, ALL_DATA = all_data, _EXTRA=extra) 
    368          IF stddev_diff EQ 1 THEN fldr.origin = 'diff' 
     383         IF stddev_diff EQ 1 THEN BEGIN 
     384          fldr.origin = 'diff' 
     385         ENDIF 
    369386      END 
    370387      ELSE: BEGIN 
     
    418435                     varpos = strpos(file_name, var1) 
    419436                     file_name3= strmid(file_name, 0, varpos)+var3_ybinx+'.nc' 
    420                      IF debug_w THEN print, '   file_name3 = ', file_name3 
     437                     IF debug_w THEN BEGIN 
     438                      print, '   file_name3 = ', file_name3 
     439                     ENDIF 
    421440                  ENDIF ELSE file_name3 = file_name 
    422441                  box_plot = def_box(small_domain, dimplot, legbox, time_stride) 
     
    445464            END 
    446465            ELSE: BEGIN 
    447                IF vecplot EQ 1 THEN BEGIN ; vectors case 
     466               IF vecplot EQ 1 THEN BEGIN 
     467                  ; vectors case 
    448468                  idx = strpos(cmd.var, ',') 
    449469                  var1 = strmid(cmd.var, 1, idx-1) 
     
    528548         cumulative = 0. 
    529549         FOR i = 1, 12 DO BEGIN 
    530             IF i EQ 1  THEN cmd.date1 = year_s + '01' 
    531             IF i EQ 2  THEN cmd.date1 = year_s + '02' 
    532             IF i EQ 3  THEN cmd.date1 = year_s + '03' 
    533             IF i EQ 4  THEN cmd.date1 = year_s + '04' 
    534             IF i EQ 5  THEN cmd.date1 = year_s + '05' 
    535             IF i EQ 6  THEN cmd.date1 = year_s + '06' 
    536             IF i EQ 7  THEN cmd.date1 = year_s + '07' 
    537             IF i EQ 8  THEN cmd.date1 = year_s + '08' 
    538             IF i EQ 9  THEN cmd.date1 = year_s + '09' 
    539             IF i EQ 10 THEN cmd.date1 = year_s + '10' 
    540             IF i EQ 11 THEN cmd.date1 = year_s + '11' 
    541             IF i EQ 12 THEN cmd.date1 = year_s + '12' 
     550            IF i EQ 1  THEN BEGIN 
     551             cmd.date1 = year_s + '01' 
     552            ENDIF 
     553            IF i EQ 2  THEN BEGIN 
     554             cmd.date1 = year_s + '02' 
     555            ENDIF 
     556            IF i EQ 3  THEN BEGIN 
     557             cmd.date1 = year_s + '03' 
     558            ENDIF 
     559            IF i EQ 4  THEN BEGIN 
     560             cmd.date1 = year_s + '04' 
     561            ENDIF 
     562            IF i EQ 5  THEN BEGIN 
     563             cmd.date1 = year_s + '05' 
     564            ENDIF 
     565            IF i EQ 6  THEN BEGIN 
     566             cmd.date1 = year_s + '06' 
     567            ENDIF 
     568            IF i EQ 7  THEN BEGIN 
     569             cmd.date1 = year_s + '07' 
     570            ENDIF 
     571            IF i EQ 8  THEN BEGIN 
     572             cmd.date1 = year_s + '08' 
     573            ENDIF 
     574            IF i EQ 9  THEN BEGIN 
     575             cmd.date1 = year_s + '09' 
     576            ENDIF 
     577            IF i EQ 10 THEN BEGIN 
     578             cmd.date1 = year_s + '10' 
     579            ENDIF 
     580            IF i EQ 11 THEN BEGIN 
     581             cmd.date1 = year_s + '11' 
     582            ENDIF 
     583            IF i EQ 12 THEN BEGIN 
     584             cmd.date1 = year_s + '12' 
     585            ENDIF 
    542586            print, '   Date1 = ', cmd.date1 
    543587            sfild = fldr 
     
    587631   ENDCASE 
    588632 
    589    IF n_elements(fldr.data) EQ 1 THEN return, fldr 
     633   IF n_elements(fldr.data) EQ 1 THEN BEGIN 
     634    return, fldr 
     635   ENDIF 
    590636 
    591637; Difference 2 cases : from cmd.exp or from cmd.spec 
     
    599645      ; read field2 
    600646      field2 = data_read(cmd, hotyp, plttyp, dimplot, iover, ALL_DATA = all_data, _EXTRA=extra) 
    601       IF n_elements(field2.data) EQ 1 THEN return, field2 
    602  
     647      IF n_elements(field2.data) EQ 1 THEN BEGIN 
     648       return, field2 
     649      ENDIF 
    603650      ; perform difference 
    604651      diff = fldr.data-field2.data 
    605       IF (where(fldr.data EQ valmask))[0] NE -1 THEN $ 
     652      IF (where(fldr.data EQ valmask))[0] NE -1 THEN BEGIN 
    606653       diff[where(fldr.data EQ valmask)] = valmask 
     654      ENDIF 
    607655      fldr.data = diff 
     656 
    608657      fldr.origin = 'diff' 
    609658      cmd.exp = exp_init 
     
    619668      ; read field2 
    620669      field2 = data_read(cmd, hotyp, plttyp, dimplot, iover, ALL_DATA = all_data, _EXTRA=extra) 
    621       IF n_elements(field2.data) EQ 1 THEN return, field2 
     670      IF n_elements(field2.data) EQ 1 THEN BEGIN 
     671       return, field2 
     672      ENDIF 
    622673 
    623674      IF plttyp EQ 'pltt' THEN BEGIN 
     
    665716         cmd2.spec = '-' 
    666717 
    667          IF n_elements(argvar) EQ 4 THEN cmd2.spec = argvar[3] 
     718         IF n_elements(argvar) EQ 4 THEN BEGIN 
     719          cmd2.spec = argvar[3] 
     720         ENDIF 
    668721 
    669722         ; read field2 
    670723         field2 = data_read(cmd2, hotyp, plttyp, dimplot, iover, ALL_DATA = all_data, _EXTRA=extra) 
    671          IF n_elements(field2.data) EQ 1 THEN return, field2 
     724         IF n_elements(field2.data) EQ 1 THEN BEGIN 
     725          return, field2 
     726         ENDIF 
    672727 
    673728         ; perform difference 
    674729         diff = fldr.data-field2.data 
    675          IF (where(fldr.data EQ valmask))[0] NE -1 THEN $ 
     730         IF (where(fldr.data EQ valmask))[0] NE -1 THEN BEGIN 
    676731          diff[where(fldr.data EQ valmask)] = valmask 
     732         ENDIF 
    677733         fldr.data = diff 
    678734         fldr.origin = 'diff' 
     
    703759   ENDIF 
    704760 
    705  
    706761return, fldr 
    707762 
  • trunk/procs/daypm.pro

    r182 r205  
    103103      ENDIF ELSE BEGIN 
    104104         leap = year_i MOD 4 
    105          IF leap EQ 0 THEN feb = 29 ELSE feb = 28 
     105         IF leap EQ 0 THEN BEGIN 
     106          feb = 29 
     107         ENDIF ELSE BEGIN 
     108          feb = 28 
     109         ENDELSE 
    106110      ENDELSE 
    107111      CASE month_i OF 
  • trunk/procs/def_box.pro

    r203 r205  
    123123   force_all_data_read = 1 
    124124 
    125    IF debug_w THEN print, '      boxdef stage 1 = ',boxdef 
     125   IF debug_w THEN BEGIN 
     126    print, '      boxdef stage 1 = ',boxdef 
     127   ENDIF 
    126128 
    127129   ; define box from pseudo-3Dmask 
  • trunk/procs/def_file_name.pro

    r203 r205  
    194194   f_suffix = suffix 
    195195 
    196    IF debug_w THEN print, '     suffix before search_time_file = ', suffix 
     196   IF debug_w THEN BEGIN 
     197    print, '     suffix before search_time_file = ', suffix 
     198   ENDIF 
    197199 
    198200   CASE strmid(cmd.plt, 0, 2) OF 
     
    213215      END 
    214216   ENDCASE 
    215    IF debug_w THEN print, '     suffix after search_time_file = ', suffix 
    216    IF debug_w THEN print, '     date1, date2 = ', date1, ' ', date2 
     217   IF debug_w THEN BEGIN 
     218    print, '     suffix after search_time_file = ', suffix 
     219    print, '     date1, date2 = ', date1, ' ', date2 
     220   ENDIF 
    217221 
    218222   IF date1 EQ '???' THEN BEGIN 
  • trunk/procs/def_file_suff_var.pro

    r203 r205  
    1010   IF debug_w THEN BEGIN 
    1111    info = report('enter ...') 
     12    print, '   cmd=', cmd 
    1213   ENDIF 
    1314 
    14       IF debug_w THEN print, '   cmd=', cmd 
    1515      macro_base_fld = cmd.var 
    1616      IF strpos(cmd.var, '@@') NE -1 THEN BEGIN 
    1717         CASE cmd.var OF 
    1818            '@@voenergy': BEGIN 
    19                IF debug_w THEN print, '   cmd.grid in def_file_suff_var = ', cmd.grid 
     19               IF debug_w THEN BEGIN 
     20                print, '   cmd.grid in def_file_suff_var = ', cmd.grid 
     21               ENDIF 
    2022               CASE cmd.grid OF 
    2123                  'T': file_suff_var = '_votemper' 
     
    2729               IF strpos(cmd.var, '@@') NE -1 THEN BEGIN 
    2830                  @def_macro_base_fld 
    29                   IF strpos(macro_base_fld, ',') NE -1 THEN macro_base_fld = (strsplit(macro_base_fld, ',', /EXTRACT))[0] 
     31                  IF strpos(macro_base_fld, ',') NE -1 THEN BEGIN 
     32                   macro_base_fld = (strsplit(macro_base_fld, ',', /EXTRACT))[0] 
     33                  ENDIF 
    3034                  file_suff_var = '_'+macro_base_fld 
    3135               ENDIF ELSE BEGIN 
     
    4044            var1 = strmid(cmd.var, 0, idx) 
    4145            sl_pos = strpos(cmd.var, '/') 
    42             IF sl_pos NE -1 THEN var1 = strmid(cmd.var, 0, sl_pos) 
     46            IF sl_pos NE -1 THEN BEGIN 
     47             var1 = strmid(cmd.var, 0, sl_pos) 
     48            ENDIF 
    4349            file_suff_var = '_'+var1 
    4450            ENDIF ELSE file_suff_var = '_'+cmd.var 
  • trunk/procs/def_grid.pro

    r203 r205  
    194194   ENDIF 
    195195 
    196    IF debug_w THEN print, '    file_suff_var = ', file_suff_var 
     196   IF debug_w THEN BEGIN 
     197    print, '    file_suff_var = ', file_suff_var 
     198   ENDIF 
    197199 
    198200; read_grid_from_file ? 
     
    211213   ENDIF ELSE var_read_grd_file = cmd.var 
    212214 
    213    IF debug_w THEN print, '    cmd.grid after test read_grid_from_file: ', cmd.grid 
     215   IF debug_w THEN BEGIN 
     216    print, '    cmd.grid after test read_grid_from_file: ', cmd.grid 
     217   ENDIF 
    214218 
    215219; choose grid (if not already loaded) 
     
    217221; tests to read 
    218222   test_box = 0 
    219    IF box_h[0] NE box_h_prev[0] OR box_h[1] NE box_h_prev[1] THEN test_box = 1 
     223   IF box_h[0] NE box_h_prev[0] OR box_h[1] NE box_h_prev[1] THEN BEGIN 
     224    test_box = 1 
     225   ENDIF 
    220226   test_read = 0 
    221227   IF cmd.grid NE cmd_prev.grid OR test_box EQ 1 THEN BEGIN 
     
    225231      suff_domain = suff_domain 
    226232   ENDELSE 
    227    IF sw_diffg EQ 1 THEN test_read = 1 
     233   IF sw_diffg EQ 1 THEN BEGIN 
     234    test_read = 1 
     235   ENDIF 
    228236 
    229237   IF test_read EQ 1 THEN BEGIN 
    230238 ; read attributes from Defaults/Grids/grid_config.def 
    231239      file_grid_config = hom_def+'grid_config.def' 
    232       IF debug_w THEN print, '      doing: grep -i "\ '+cmd.grid+' " '+file_grid_config 
     240      IF debug_w THEN BEGIN 
     241       print, '      doing: grep -i "\ '+cmd.grid+' " '+file_grid_config 
     242      ENDIF 
    233243      spawn, 'grep -i "\ '+cmd.grid+' " '+file_grid_config, line 
    234244      line = strcompress(strtrim(line[0], 2)) 
    235245      length = strlen(line) 
    236246 
    237       IF debug_w THEN print, '      line from grid_config.def  ',line 
     247      IF debug_w THEN BEGIN 
     248       print, '      line from grid_config.def  ',line 
     249      ENDIF 
    238250 
    239251      IF length EQ 0 THEN BEGIN 
     
    251263   ENDIF 
    252264 
    253    IF masked_data EQ 0 THEN atmos_msk = 0 
     265   IF masked_data EQ 0 THEN BEGIN 
     266    atmos_msk = 0 
     267   ENDIF 
    254268 
    255269; init zoom for data read 
     
    260274      izmindta = 0 
    261275   ENDIF 
    262    IF debug_w THEN print, '     varexp in def_grid before case cmd.grid:', varexp 
    263  
    264    IF read_grid_from_file EQ 1 THEN GOTO, final 
    265  
     276   IF debug_w THEN BEGIN 
     277    print, '     varexp in def_grid before case cmd.grid:', varexp 
     278   ENDIF 
     279 
     280   IF read_grid_from_file EQ 1 THEN BEGIN 
     281    GOTO, final 
     282   ENDIF 
    266283   CASE cmd.grid OF 
    267284      't30': BEGIN 
     
    314331      END 
    315332      'reg1.125': BEGIN 
    316          IF test_read EQ 1 THEN read_grid_from_file = 1 
     333         IF test_read EQ 1 THEN BEGIN 
     334          read_grid_from_file = 1 
     335         ENDIF 
    317336      END 
    318337;      'reg2.5': BEGIN 
    319 ;         IF test_read EQ 1 THEN read_grid_from_file = 1 
     338;         IF test_read EQ 1 THEN BEGIN 
     339;           read_grid_from_file = 1 
     340;         ENDIF 
    320341;      END 
    321342      'reg1m': BEGIN 
    322          IF test_read EQ 1 THEN read_grid_from_file = 1 
     343         IF test_read EQ 1 THEN BEGIN 
     344          read_grid_from_file = 1 
     345         ENDIF 
    323346      END 
    324347      'reg1': BEGIN 
    325          IF test_read EQ 1 THEN read_grid_from_file = 1 
     348         IF test_read EQ 1 THEN BEGIN 
     349          read_grid_from_file = 1 
     350         ENDIF 
    326351      END 
    327352      'reg1mtrop': BEGIN 
     
    355380 
    356381            h_config_oce = 'ORCA_R2' 
    357             IF strpos (cmd.grid, '05') NE -1 THEN h_config_oce = 'ORCA05' 
     382            IF strpos (cmd.grid, '05') NE -1 THEN BEGIN 
     383             h_config_oce = 'ORCA05' 
     384            ENDIF 
    358385 
    359386            IF meshlec_type NE 'oce' OR data_dom_type NE data_domain OR h_config_oce_type NE h_config_oce OR v_config_oce_type NE v_config_oce OR orca_mask_version_type NE orca_mask_version OR test_box EQ 1 OR test_read EQ 1 THEN BEGIN 
  • trunk/procs/def_macro_base_fld.pro

    r203 r205  
    77                  var_name = cmd.var 
    88                  @get_macro_def 
    9                   IF debug_w THEN print, '   macro_def in def_file_suff_var =', macro_def 
     9                  IF debug_w THEN BEGIN 
     10                   print, '   macro_def in def_file_suff_var =', macro_def 
     11                  ENDIF 
    1012                  CASE macro_def[1] OF 
    1113                     '=:': BEGIN 
  • trunk/procs/def_month.pro

    r203 r205  
    8484 ENDIF 
    8585 
    86    IF strpos(date, '_') GT -1 THEN date = strmid(date, 0, strpos(date, '_')) 
     86   IF strpos(date, '_') GT -1 THEN BEGIN 
     87    date = strmid(date, 0, strpos(date, '_')) 
     88   ENDIF 
    8789   CASE strmid(timave, 0, 2) OF 
    8890      '1m': BEGIN 
  • trunk/procs/def_work.pro

    r203 r205  
    172172      cmd = decode_cmd(cmdline, iline) 
    173173 
    174       IF out_all NE '-'  THEN cmd.out = out_all 
     174      IF out_all NE '-'  THEN BEGIN 
     175       cmd.out = out_all 
     176      ENDIF 
    175177 
    176178      IF cmd.on EQ 1 THEN BEGIN 
    177          IF debug_w THEN print, '    iline = ', iline 
     179         IF debug_w THEN BEGIN 
     180          print, '    iline = ', iline 
     181         ENDIF 
    178182         iplot = iplot + 1 
    179183         print, ' ' 
     
    215219 
    216220         display = cmd.disp 
    217          IF posP GT 0 OR posL GT 0 THEN display = strmid(cmd.disp, 0, len-1) 
     221         IF posP GT 0 OR posL GT 0 THEN BEGIN 
     222          display = strmid(cmd.disp, 0, len-1) 
     223         ENDIF 
    218224         posx = rstrpos(display, 'x') 
    219225         IF posx GT 0 THEN BEGIN 
     
    395401 
    396402                  line = conv+out_ps+'/'+fileps+' '+dir_name+'/'+nfile_name+file_suffix+ext 
    397                   IF debug_w THEN print, ' Convert command= ', line 
     403                  IF debug_w THEN BEGIN 
     404                   print, ' Convert command= ', line 
     405                  ENDIF 
    398406                  spawn, line, prtout 
    399407                  print, '   ' 
  • trunk/procs/densit_pltmap_read.pro

    r203 r205  
    2020         cumulative = 0. 
    2121         FOR i = 1, 12 DO BEGIN 
    22             IF strlen(strmid(strcompress(string(year_s)),1)) eq 1 THEN year_s_string = '0'+strmid(strcompress(string(year_s)),1) 
    23             IF strlen(strmid(strcompress(string(year_s)),1)) GT 1 THEN year_s_string = strmid(strcompress(string(year_s)),1) 
     22            IF strlen(strmid(strcompress(string(year_s)),1)) eq 1 THEN BEGIN 
     23             year_s_string = '0'+strmid(strcompress(string(year_s)),1) 
     24            ENDIF 
     25            IF strlen(strmid(strcompress(string(year_s)),1)) GT 1 THEN BEGIN 
     26             year_s_string = strmid(strcompress(string(year_s)),1) 
     27            ENDIF 
    2428            IF i LE 9 THEN BEGIN 
    2529               cmd.date1 = year_s_string+'0'+strtrim(string(i), 2) 
  • trunk/procs/fld_pltext.pro

    r203 r205  
    170170         fldextr.dmax = !VALUES.F_NAN 
    171171         fldextr.spec = !VALUES.F_NAN 
    172          IF debug_w THEN print, '   Number of args for fldext:', n_elements(argvar) 
     172         IF debug_w THEN BEGIN 
     173          print, '   Number of args for fldext:', n_elements(argvar) 
     174         ENDIF 
    173175         IF n_elements(argvar) GE 5 THEN BEGIN 
    174176            fldextr.homin = float(argvar[3]) 
  • trunk/procs/fld_pltint.pro

    r203 r205  
    121121      ELSE: file_iso = 'fld_glo_iso.def' 
    122122   ENDCASE 
    123    IF field.origin EQ 'diff' THEN file_iso = 'fld_zoo_iso.def' 
     123   IF field.origin EQ 'diff' THEN BEGIN 
     124    file_iso = 'fld_zoo_iso.def' 
     125   ENDIF 
    124126 
    125    IF debug_w THEN print, ' field.origin in fld_pltint: ', field.origin 
     127   IF debug_w THEN BEGIN 
     128    print, ' field.origin in fld_pltint: ', field.origin 
     129   ENDIF 
    126130 
    127131   print,' ' 
  • trunk/procs/get_macro_def.pro

    r203 r205  
    1818; name of macro file 
    1919   file_mac = hom_def+'fld_macros.def' 
    20    IF debug_w THEN print, '    var_name in get_macro_def: ', var_name 
     20   IF debug_w THEN BEGIN 
     21    print, '    var_name in get_macro_def: ', var_name 
     22   ENDIF 
    2123; 
    2224; special case for stddev monthly 
     
    3234   line = strcompress(strtrim(line[0], 2)) 
    3335   length = strlen(line) 
    34    IF debug_w THEN print, '    line: ', line 
     36   IF debug_w THEN BEGIN 
     37    print, '    line: ', line 
     38   ENDIF 
    3539 
    3640   IF length EQ 0 THEN BEGIN 
  • trunk/procs/lec_pal_gmt.pro

    r203 r205  
    137137 ENDIF 
    138138 
    139    IF n_elements(idx_pal) EQ 0 THEN idx_pal = 0 
     139   IF n_elements(idx_pal) EQ 0 THEN BEGIN 
     140    idx_pal = 0 
     141   ENDIF 
    140142 
    141143   found = 1 
     
    213215            ENDELSE 
    214216            IF long(iso) NE 0 THEN BEGIN 
    215                IF iso/long(iso) NE 1 THEN fmt = '(f5.1)' 
     217               IF iso/long(iso) NE 1 THEN BEGIN 
     218                fmt = '(f5.1)' 
     219               ENDIF 
    216220            ENDIF 
    217221         ENDIF ELSE begin 
  • trunk/procs/legend_overlay.pro

    r203 r205  
    1111                                ; domain_y = minc,maxc / 
    1212                                ; domaint=time[0], time[jptmax-1] 
    13 IF debug_w THEN print, ' in legend_overlay, iover=', iover 
     13IF debug_w THEN BEGIN 
     14 print, ' in legend_overlay, iover=', iover 
     15ENDIF 
    1416; 
    1517; decode legend format from command line (see def_work cmdi.proj) 
     
    2426; when there is more than one seasonal cycle 
    2527jptmax = jpt * nb_cycles 
    26 IF debug_w THEN print, 'leg_format, leg_pos: ', leg_format, leg_pos 
    27 IF debug_w THEN print, 'jpt, jptmax, nb_cycles: ', jpt, jptmax, nb_cycles 
     28IF debug_w THEN BEGIN 
     29 print, 'leg_format, leg_pos: ', leg_format, leg_pos 
     30 print, 'jpt, jptmax, nb_cycles: ', jpt, jptmax, nb_cycles 
     31ENDIF 
    2832 
    2933; legend line text 
    3034leg_txt = '' 
    31 IF strpos(txt_format, 'E') NE -1 THEN leg_txt = leg_txt+cmd.exp+' ' 
    32 IF strpos(txt_format, 'V') NE -1 THEN leg_txt = leg_txt+cmd.var+' ' 
    33 IF strpos(txt_format, 'L') NE -1 THEN leg_txt = leg_txt+field.legend+' ' 
    34 IF strpos(txt_format, 'U') NE -1 THEN leg_txt = leg_txt+'('+field.units+') ' 
    35 IF strpos(txt_format, 'T') NE -1 THEN leg_txt = leg_txt+cmd.date1+' ' 
    36 IF strpos(txt_format, 'B') NE -1 THEN leg_txt = leg_txt+legz+' ' 
    37 IF strpos(txt_format, 'S') NE -1 THEN leg_txt = leg_txt+' std='+stddev_txt+' ' 
     35IF strpos(txt_format, 'E') NE -1 THEN BEGIN 
     36 leg_txt = leg_txt+cmd.exp+' ' 
     37ENDIF 
     38IF strpos(txt_format, 'V') NE -1 THEN BEGIN 
     39 leg_txt = leg_txt+cmd.var+' ' 
     40ENDIF 
     41IF strpos(txt_format, 'L') NE -1 THEN BEGIN 
     42 leg_txt = leg_txt+field.legend+' ' 
     43ENDIF 
     44IF strpos(txt_format, 'U') NE -1 THEN BEGIN 
     45 leg_txt = leg_txt+'('+field.units+') ' 
     46ENDIF 
     47IF strpos(txt_format, 'T') NE -1 THEN BEGIN 
     48 leg_txt = leg_txt+cmd.date1+' ' 
     49ENDIF 
     50IF strpos(txt_format, 'B') NE -1 THEN BEGIN 
     51 leg_txt = leg_txt+legz+' ' 
     52ENDIF 
     53IF strpos(txt_format, 'S') NE -1 THEN BEGIN 
     54 leg_txt = leg_txt+' std='+stddev_txt+' ' 
     55ENDIF 
    3856 
    3957CASE plttyp OF 
     
    4361 
    4462 
    45 IF debug_w THEN print, ' leg_pos, leg_txt = ', leg_pos, leg_txt 
     63IF debug_w THEN BEGIN 
     64 print, ' leg_pos, leg_txt = ', leg_pos, leg_txt 
     65ENDIF 
    4666; px_n = percentage of window size function of number of windows 
    4767; initial percentage px_1r is function of strlen(leg_txt) 
     
    80100px_tl = px_2l+delta_txt 
    81101 
    82 IF plttyp EQ 'yfx' THEN px_tl = 0.04 
    83  
    84 IF debug_w THEN print, ' nwin_tot, n_leg_max = ', nwin_tot, n_leg_max 
     102IF plttyp EQ 'yfx' THEN BEGIN 
     103 px_tl = 0.04 
     104ENDIF 
     105 
     106IF debug_w THEN BEGIN 
     107 print, ' nwin_tot, n_leg_max = ', nwin_tot, n_leg_max 
     108ENDIF 
    85109 
    86110delta = float(maxc-minc)/(float(n_leg_max)+2.) 
    87111; position of legend line (x_leg_1 to 2,y_leg) and text x_leg_t,; y_leg_t 
    88 IF strmid(leg_pos, 0, 1) EQ 'L' THEN BEGIN ; (L)ower 
    89    y_leg = minc+(nover-float(iover)+0.5)*delta 
    90 ENDIF ELSE BEGIN ; (U)pper 
    91    y_leg = maxc-(float(iover))*delta 
     112IF strmid(leg_pos, 0, 1) EQ 'L' THEN BEGIN 
     113 ; (L)ower 
     114 y_leg = minc+(nover-float(iover)+0.5)*delta 
     115ENDIF ELSE BEGIN 
     116 ; (U)pper 
     117 y_leg = maxc-(float(iover))*delta 
    92118ENDELSE 
    93119; special case of plt1d,'z' 
    94120 
    95 IF plttyp EQ 'plt1d' AND plt1dtyp EQ 'z' THEN  BEGIN 
     121IF plttyp EQ 'plt1d' AND plt1dtyp EQ 'z' THEN BEGIN 
    96122   ymin = boite_plt1d(4) 
    97123   ymax = boite_plt1d(5) 
    98124   y_dim = boite_plt1d(5)-boite_plt1d(4) 
    99125   delta = y_dim/(float(n_leg_max)+2.) 
    100    IF strmid(leg_pos, 0, 1) EQ 'L' THEN BEGIN ; (L)ower 
    101       y_leg = ymax-(nover-float(iover)+0.5)*delta 
    102    ENDIF ELSE BEGIN             ; (U)pper 
    103       y_leg = ymin+(float(iover)+0.5)*delta 
     126   IF strmid(leg_pos, 0, 1) EQ 'L' THEN BEGIN 
     127    ; (L)ower 
     128    y_leg = ymax-(nover-float(iover)+0.5)*delta 
     129   ENDIF ELSE BEGIN 
     130    ; (U)pper 
     131    y_leg = ymin+(float(iover)+0.5)*delta 
    104132   ENDELSE 
    105133ENDIF 
    106134y_leg_t = y_leg*y_scale_txt 
    107135; case pltt plt1d 
    108 IF debug_w THEN print, 'size(time) ', size(time) 
    109 IF debug_w THEN print, 'minc/maxc =', minc, maxc 
     136IF debug_w THEN BEGIN 
     137 print, 'size(time) ', size(time) 
     138 print, 'minc/maxc =', minc, maxc 
     139ENDIF 
    110140 
    111141CASE plttyp OF 
    112142   'pltt': BEGIN 
    113       IF strmid(leg_pos, 1, 1) EQ 'R' THEN BEGIN ; (R)ight 
    114          x_leg_1 = time[floor(px_1r*(jptmax-1))] 
    115          x_leg_2 = time[floor(px_2r*(jptmax-1))] 
    116          x_leg_t = time[floor(px_tr*(jptmax-1))] 
    117       ENDIF ELSE BEGIN          ; (L)eft 
    118          x_leg_1 = time[floor(px_1l*(jptmax-1))] 
    119          x_leg_2 = time[floor(px_2l*(jptmax-1))] 
    120          x_leg_t = time[floor(px_tl*(jptmax-1))] 
     143      IF strmid(leg_pos, 1, 1) EQ 'R' THEN BEGIN 
     144       ; (R)ight 
     145       x_leg_1 = time[floor(px_1r*(jptmax-1))] 
     146       x_leg_2 = time[floor(px_2r*(jptmax-1))] 
     147       x_leg_t = time[floor(px_tr*(jptmax-1))] 
     148      ENDIF ELSE BEGIN 
     149       ; (L)eft 
     150       x_leg_1 = time[floor(px_1l*(jptmax-1))] 
     151       x_leg_2 = time[floor(px_2l*(jptmax-1))] 
     152       x_leg_t = time[floor(px_tl*(jptmax-1))] 
    121153      ENDELSE 
    122154   END 
     
    137169         ELSE: 
    138170      ENDCASE 
    139       IF strmid(leg_pos, 1, 1) EQ 'R' THEN BEGIN ; (R)ight 
    140          x_leg_1 = xmin+px_1r*x_dim 
    141          x_leg_2 = xmin+px_2r*x_dim 
    142          x_leg_t = xmin+px_tr*x_dim 
    143       ENDIF ELSE BEGIN          ; (L)eft 
    144          x_leg_1 = xmin+px_1l*x_dim 
    145          x_leg_2 = xmin+px_2l*x_dim 
    146          x_leg_t = xmin+px_tl*x_dim 
     171      IF strmid(leg_pos, 1, 1) EQ 'R' THEN BEGIN 
     172       ; (R)ight 
     173       x_leg_1 = xmin+px_1r*x_dim 
     174       x_leg_2 = xmin+px_2r*x_dim 
     175       x_leg_t = xmin+px_tr*x_dim 
     176      ENDIF ELSE BEGIN 
     177       ; (L)eft 
     178       x_leg_1 = xmin+px_1l*x_dim 
     179       x_leg_2 = xmin+px_2l*x_dim 
     180       x_leg_t = xmin+px_tl*x_dim 
    147181      ENDELSE 
    148182   END 
     
    150184      x_leg_1 = -1.e10 
    151185      x_leg_2 = -1.e10 
    152       IF debug_w THEN print, 'minc2/maxc2 =', minc2, maxc2 
     186      IF debug_w THEN BEGIN 
     187       print, 'minc2/maxc2 =', minc2, maxc2 
     188      ENDIF 
    153189      xmin = minc2 
    154190      x_dim = maxc2-minc2 
    155       IF strmid(leg_pos, 1, 1) EQ 'R' THEN BEGIN ; (R)ight 
    156          x_leg_t = xmin+px_tr*x_dim 
    157       ENDIF ELSE BEGIN          ; (L)eft 
    158          x_leg_t = xmin+px_tl*x_dim 
     191      IF strmid(leg_pos, 1, 1) EQ 'R' THEN BEGIN 
     192       ; (R)ight 
     193       x_leg_t = xmin+px_tr*x_dim 
     194      ENDIF ELSE BEGIN 
     195       ; (L)eft 
     196       x_leg_t = xmin+px_tl*x_dim 
    159197      ENDELSE 
    160198   END 
     
    184222   ELSE: 
    185223ENDCASE 
    186 IF debug_w THEN print, overc_l 
     224IF debug_w THEN BEGIN 
     225 print, overc_l 
     226ENDIF 
    187227; draw text 
    188228xyouts, x_leg_t, y_leg_t, leg_txt, charsize = txt_ft_size, color = string(line_color(iover-1)), charthick = 1., font = 1. 
  • trunk/procs/macros/make_bsf.pro

    r203 r205  
    157157 
    158158   isign=where(glamt gt 380.) 
    159    IF isign[0] NE -1 THEN glamt[isign] = glamt[isign]-360. 
     159   IF isign[0] NE -1 THEN BEGIN 
     160    glamt[isign] = glamt[isign]-360. 
     161   ENDIF 
    160162   isign=where(glamu gt 380.) 
    161    IF isign[0] NE -1 THEN glamu[isign] = glamu[isign]-360. 
     163   IF isign[0] NE -1 THEN BEGIN 
     164    glamu[isign] = glamu[isign]-360. 
     165   ENDIF 
    162166   isign=where(glamv gt 380.) 
    163    IF isign[0] NE -1 THEN glamv[isign] = glamv[isign]-360. 
     167   IF isign[0] NE -1 THEN BEGIN 
     168    glamv[isign] = glamv[isign]-360. 
     169   ENDIF 
    164170   isign=where(glamf gt 380.) 
    165    IF isign[0] NE -1 THEN glamf[isign] = glamf[isign]-360. 
     171   IF isign[0] NE -1 THEN BEGIN 
     172    glamf[isign] = glamf[isign]-360. 
     173   ENDIF 
    166174;   domdef, old_boite 
    167175 
  • trunk/procs/macros/make_correlation.pro

    r203 r205  
    9191      varpos = strpos(file_name, var_name1) 
    9292      file_name2= strmid(file_name, 0, varpos)+var_name2+'.nc' 
    93       IF debug_w THEN print, '   file_name2 = ', file_name2 
     93      IF debug_w THEN BEGIN 
     94       print, '   file_name2 = ', file_name2 
     95      ENDIF 
    9496   ENDIF ELSE file_name2 = file_name 
    9597 
     
    114116   FOR imth = 0, nmth-1 DO BEGIN 
    115117 
    116       IF debug_w THEN print, '   month idx/value: ', imth, strd[imth] 
     118      IF debug_w THEN BEGIN 
     119       print, '   month idx/value: ', imth, strd[imth] 
     120      ENDIF 
    117121 
    118122      data1 = (var1.data)[*, *, reform(idxm[imth,*], njpt)] 
     
    130134   pt_correl = pt_correl/float(nmth) 
    131135 
    132    IF idm[0] NE -1 THEN pt_correl[idm] = valmask 
     136   IF idm[0] NE -1 THEN BEGIN 
     137    pt_correl[idm] = valmask 
     138   ENDIF 
    133139 
    134140   varname = varname+' '+ntxt 
  • trunk/procs/macros/make_correldomain.pro

    r203 r205  
    9595 
    9696   file_domain = domain_db+domain+'_'+cmd1_back.exp+'_'+cmd1_back.date1+'_'+cmd1_back.spec+'.nc' 
    97    IF debug_w THEN print, '     file_domain: ', file_domain 
     97   IF debug_w THEN BEGIN 
     98    print, '     file_domain: ', file_domain 
     99   ENDIF 
    98100 
    99101   var_dom = ncdf_lec(file_domain, var = domain) 
    100102 
    101    IF debug_w THEN print, '     size of var_dom: ', size(var_dom) 
     103   IF debug_w THEN BEGIN 
     104    print, '     size of var_dom: ', size(var_dom) 
     105   ENDIF 
    102106 
    103107   IF (size(var_dom))[1] NE jpt THEN BEGIN 
     
    113117   nya = (size(var.data))[2] 
    114118 
    115    IF debug_w THEN print, '   nxa, nya', nxa, nya 
     119   IF debug_w THEN BEGIN 
     120    print, '   nxa, nya', nxa, nya 
     121   ENDIF 
    116122 
    117123   correl = fltarr(nxa, nya) 
     
    124130   FOR imth = 0, nmth-1 DO BEGIN 
    125131 
    126       IF debug_w THEN print, '   month idx/value: ', imth, strd[imth] 
     132      IF debug_w THEN BEGIN 
     133       print, '   month idx/value: ', imth, strd[imth] 
     134      ENDIF 
    127135 
    128136      data = (var.data)[*, *, reform(idxm[imth,*], njpt)] 
     
    149157   correl = correl/float(nmth) 
    150158 
    151    IF idm[0] NE -1 THEN correl[idm] = valmask 
     159   IF idm[0] NE -1 THEN BEGIN 
     160    correl[idm] = valmask 
     161   ENDIF 
    152162 
    153163   varname = varname+' '+ntxt 
  • trunk/procs/macros/make_crtm.pro

    r203 r205  
    9999   field.direc = ucrt.direc 
    100100   posave = max( [strpos(ucrt.legend, ' averaged'), strpos(ucrt.legend, ' at')] ) 
    101    IF posave NE -1 THEN field.legend = strmid(ucrt.legend, posave) 
     101   IF posave NE -1 THEN BEGIN 
     102    field.legend = strmid(ucrt.legend, posave) 
     103   ENDIF 
    102104 
    103105   return, field 
  • trunk/procs/macros/make_denflw.pro

    r203 r205  
    8686   field.origin = 'computed' 
    8787   field.dim = 2 
    88    IF jpt EQ 1 THEN field.direc = 'xy' ELSE field.direc = 'xyt' 
     88   IF jpt EQ 1 THEN BEGIN 
     89    field.direc = 'xy' 
     90   ENDIF ELSE BEGIN 
     91    field.direc = 'xyt' 
     92   ENDELSE 
    8993 
    9094   return, field 
  • trunk/procs/macros/make_denflx.pro

    r203 r205  
    7474   field.origin = 'computed' 
    7575   field.dim = 2 
    76    IF jpt EQ 1 THEN field.direc = 'xy' ELSE field.direc = 'xyt' 
     76   IF jpt EQ 1 THEN BEGIN 
     77    field.direc = 'xy' 
     78   ENDIF ELSE BEGIN 
     79    field.direc = 'xyt' 
     80   ENDELSE 
    7781 
    7882   return, field 
  • trunk/procs/macros/make_depth.pro

    r203 r205  
    9292   fieldr = {name: '', data: fltarr(jpi, jpj, jpk), legend: '', units: '', origin: '', dim: 0, direc:''} 
    9393 
    94    IF strpos(ncdf_db, ':') GE 1 THEN directory = (strsplit(ncdf_db, ':', /EXTRACT))[1] $ 
    95     ELSE directory = ncdf_db 
     94   IF strpos(ncdf_db, ':') GE 1 THEN BEGIN 
     95    directory = (strsplit(ncdf_db, ':', /EXTRACT))[1] 
     96   ENDIF ELSE BEGIN 
     97    directory = ncdf_db 
     98   ENDELSE 
    9699 
    97100   fieldr.origin = directory+file_name 
  • trunk/procs/macros/make_energetics.pro

    r203 r205  
    190190         valmask = 1.e20 
    191191         idxw = where (tmaskr EQ 0) 
    192          IF idxw[0] NE -1 THEN w[idxw] = valmask 
     192         IF idxw[0] NE -1 THEN BEGIN 
     193          w[idxw] = valmask 
     194         ENDIF 
    193195         idxt = where (tmaskr EQ 0) 
    194          IF idxt[0] NE -1 THEN t [idxt] = 0. 
    195          IF idxt[0] NE -1 THEN s [idxt] = 0. 
     196         IF idxt[0] NE -1 THEN BEGIN 
     197          t[idxt] = 0. 
     198         ENDIF 
     199         IF idxt[0] NE -1 THEN BEGIN 
     200          s[idxt] = 0. 
     201         ENDIF 
    196202         tmaskr = 0 ; free memory 
    197203      ENDIF ELSE BEGIN 
    198204         idxt = where (t EQ valmask) 
    199          IF idxt[0] NE -1 THEN t [idxt] = 0. 
    200          IF idxt[0] NE -1 THEN s [idxt] = 0. 
     205         IF idxt[0] NE -1 THEN BEGIN 
     206          t[idxt] = 0. 
     207         ENDIF 
     208         IF idxt[0] NE -1 THEN BEGIN 
     209          s[idxt] = 0. 
     210         ENDIF 
    201211      ENDELSE 
    202212 
     
    223233 
    224234      idx_2d = where (u[*, *, 0, 0] GT valmask/10.) 
    225       IF idx_2d[0] NE -1 THEN tx[idx_2d] = valmask 
     235      IF idx_2d[0] NE -1 THEN BEGIN 
     236       tx[idx_2d] = valmask 
     237      ENDIF 
    226238      idx_2d = where (v[*, *, 0, 0] GT valmask/10.) 
    227       IF idx_2d[0] NE -1 THEN ty[idx_2d] = valmask 
     239      IF idx_2d[0] NE -1 THEN BEGIN 
     240       ty[idx_2d] = valmask 
     241      ENDIF 
    228242      idx = where (t LT valmask/10.) 
    229243      IF t_unit NE "C" THEN BEGIN 
    230          IF idx[0] NE -1 THEN t[idx] = t[idx]-273.15 
     244         IF idx[0] NE -1 THEN BEGIN 
     245          t[idx] = t[idx]-273.15 
     246         ENDIF 
    231247      ENDIF 
    232248      idx1 = n_elements(idx_t) 
     
    241257      idxt=where(t GT valmask/10.) 
    242258      idxs=where(s GT valmask/10.) 
    243       IF source_model EQ 'ipcc' THEN print, '       check these are 0 (T,S): ', min(idxt -idxs), max(idxt-idxs) 
    244       IF idxt[0] NE -1 THEN t[idxt]=0. 
    245       IF idxs[0] NE -1 THEN s[idxs]=0. 
     259      IF source_model EQ 'ipcc' THEN BEGIN 
     260       print, '       check these are 0 (T,S): ', min(idxt -idxs), max(idxt-idxs) 
     261      ENDIF 
     262      IF idxt[0] NE -1 THEN BEGIN 
     263       t[idxt]=0. 
     264      ENDIF 
     265      IF idxs[0] NE -1 THEN BEGIN 
     266       s[idxs]=0. 
     267      ENDIF 
    246268      idxs = 0                  ; free memory 
    247269 
     
    262284   rhop = ( ( 4.8314E-4*s + r3*sr +r2)*s +r1) 
    263285   print, '      rhop min/max', min(rhop), max(rhop) 
    264    IF idxt[0] NE -1 THEN rhop[idxt] = valmask 
     286   IF idxt[0] NE -1 THEN BEGIN 
     287    rhop[idxt] = valmask 
     288   ENDIF 
    265289   sr = 0 & r1 = 0 &  r2 = 0 &  r3 = 0 & t = 0 & s = 0 ; free memory 
    266290 
     
    305329 
    306330   int_val2 = ((rhop-rho_s4d)^2)*stab_inv 
    307    IF idxt[0] NE -1 THEN int_val2[idxt] = 0. 
     331   IF idxt[0] NE -1 THEN BEGIN 
     332    int_val2[idxt] = 0. 
     333   ENDIF 
    308334 
    309335   print, '     compute APE...' 
     
    321347 
    322348   int_val = (rhop-rho_s4d)*(w_T) 
    323    IF idxt[0] NE -1 THEN int_val[idxt] = 0. 
     349   IF idxt[0] NE -1 THEN BEGIN 
     350    int_val[idxt] = 0. 
     351   ENDIF 
    324352 
    325353; remove first 2 levels (MXL too unstable) 
     
    348376   idyv = where(vmean GT valmask/10.) 
    349377 
    350    IF idx[0] NE -1 THEN tx[idx] = 0. 
    351    IF idy[0] NE -1 THEN ty[idy] = 0. 
    352    IF idxu[0] NE -1 THEN umean[idxu] = 0. 
    353    IF idyv[0] NE -1 THEN vmean[idyv] = 0. 
     378   IF idx[0] NE -1 THEN BEGIN 
     379    tx[idx] = 0. 
     380   ENDIF 
     381   IF idy[0] NE -1 THEN BEGIN 
     382    ty[idy] = 0. 
     383   ENDIF 
     384   IF idxu[0] NE -1 THEN BEGIN 
     385    umean[idxu] = 0. 
     386   ENDIF 
     387   IF idyv[0] NE -1 THEN BEGIN 
     388    vmean[idyv] = 0. 
     389   ENDIF 
    354390 
    355391   dot_prodx = tx*umean 
     
    387423   tvlct, red, green, blue 
    388424 
    389    IF cmd_wrk.out EQ 'ps' THEN ps = 1 
    390  
    391    IF ps EQ 1 THEN openps 
     425   IF cmd_wrk.out EQ 'ps' THEN BEGIN 
     426    ps = 1 
     427   ENDIF 
     428 
     429   IF ps EQ 1 THEN BEGIN 
     430    openps 
     431   ENDIF 
    392432 
    393433   pltt, ape, 't', petit = [2, 4, 1], landscape = 1, /rempli, /BASICMARGES, title = 'APE (full) '+cmd_wrk.exp, window=3 
     
    422462 
    423463   maxdepth = 10 
    424    IF gdept[0] GT maxdepth THEN maxdepth = gdept[0] 
     464   IF gdept[0] GT maxdepth THEN BEGIN 
     465    maxdepth = gdept[0] 
     466   ENDIF 
    425467 
    426468   ;domdef, [210., 280., -5., 5., 0., maxdepth] 
  • trunk/procs/macros/make_eos.pro

    r203 r205  
    115115   idxt=where(t eq valmask) 
    116116   idxs=where(s eq valmask) 
    117    IF idxt[0] NE -1 THEN t[idxt]=0. 
    118    IF idxs[0] NE -1 THEN s[idxs]=0. 
     117   IF idxt[0] NE -1 THEN BEGIN 
     118    t[idxt]=0. 
     119   ENDIF 
     120   IF idxs[0] NE -1 THEN BEGIN 
     121    s[idxs]=0. 
     122   ENDIF 
    119123; 
    120124; potential volumic mass 
     
    127131   rhopn = ( ( 4.8314E-4*s + r3*sr +r2)*s +r1) 
    128132 
    129    IF idxs[0] NE -1 THEN rhopn[idxt] = valmask 
     133   IF idxs[0] NE -1 THEN BEGIN 
     134    rhopn[idxt] = valmask 
     135   ENDIF 
    130136 
    131137   fdirec = tn.direc 
  • trunk/procs/macros/make_eos_sal.pro

    r203 r205  
    116116   idxt=where(t eq valmask) 
    117117   idxs=where(s eq valmask) 
    118    IF idxt[0] NE -1 THEN t[idxt]=0. 
    119    IF idxs[0] NE -1 THEN s[idxs]=0. 
     118   IF idxt[0] NE -1 THEN BEGIN 
     119    t[idxt]=0. 
     120   ENDIF 
     121   IF idxs[0] NE -1 THEN BEGIN 
     122    s[idxs]=0. 
     123   ENDIF 
    120124; 
    121125; potential volumic mass 
     
    128132   rhopn = ( ( 0.0E-4*s + 0.0*r3*sr +r2)*s +0.0*r1) 
    129133 
    130    IF idxs[0] NE -1 THEN rhopn[idxt] = valmask 
     134   IF idxs[0] NE -1 THEN BEGIN 
     135    rhopn[idxt] = valmask 
     136   ENDIF 
    131137 
    132138   fdirec = tn.direc 
  • trunk/procs/macros/make_eos_tem.pro

    r203 r205  
    118118   idxt=where(t eq valmask) 
    119119   idxs=where(s eq valmask) 
    120    IF idxt[0] NE -1 THEN t[idxt]=0. 
    121    IF idxs[0] NE -1 THEN s[idxs]=0. 
     120   IF idxt[0] NE -1 THEN BEGIN 
     121    t[idxt]=0. 
     122   ENDIF 
     123   IF idxs[0] NE -1 THEN BEGIN 
     124    s[idxs]=0. 
     125   ENDIF 
    122126; 
    123127; potential volumic mass 
     
    130134   rhopn = ( ( 4.8314E-4*s + r3*sr +r2)*s +r1) 
    131135 
    132    IF idxs[0] NE -1 THEN rhopn[idxt] = valmask 
     136   IF idxs[0] NE -1 THEN BEGIN 
     137    rhopn[idxt] = valmask 
     138   ENDIF 
    133139 
    134140   fdirec = tn.direc 
  • trunk/procs/macros/make_interp.pro

    r203 r205  
    109109      print, 'var1 : ', varname1, 'coef1 : ', coef1 
    110110      print, 'var2 : ', varname2, 'coef2 : ', coef2 
    111       IF nb EQ 6 THEN print, 'var3 : ', varname3, 'coef3 : ', coef3 
     111      IF nb EQ 6 THEN BEGIN 
     112       print, 'var3 : ', varname3, 'coef3 : ', coef3 
     113      ENDIF 
    112114   ENDIF 
    113115 
    114116   var1 = nc_read(file_name, varname1, ncdf_db, BOXZOOM = boxzoom, TIME_1 = time_1, TIME_2 = time_2, ALL_DATA = all_data) 
    115117   var2 = nc_read(file_name, varname2, ncdf_db, BOXZOOM = boxzoom, TIME_1 = time_1, TIME_2 = time_2, ALL_DATA = all_data) 
    116    IF nb EQ 6 THEN var3 = nc_read(file_name, varname3, ncdf_db, BOXZOOM = boxzoom, TIME_1 = time_1, TIME_2 = time_2, ALL_DATA = all_data) 
     118   IF nb EQ 6 THEN BEGIN 
     119    var3 = nc_read(file_name, varname3, ncdf_db, BOXZOOM = boxzoom, TIME_1 = time_1, TIME_2 = time_2, ALL_DATA = all_data) 
     120   ENDIF 
    117121 
    118122   interp = var1.data 
    119123   idx = WHERE( var1.data NE valmask ) 
    120    IF( idx[0] EQ -1 ) THEN STOP, 'STOP. Something wrong in the data' 
     124   IF( idx[0] EQ -1 ) THEN BEGIN 
     125    STOP, 'STOP. Something wrong in the data' 
     126   ENDIF 
    121127 
    122128   interp[idx] = ( nb EQ 6 ) ? coef1*var1.data[idx] + coef2*var2.data[idx] + coef3*var3.data[idx] : coef1*var1.data[idx] + coef2*var2.data[idx] 
  • trunk/procs/macros/make_linfit.pro

    r203 r205  
    9191      varpos = strpos(file_name, var_name1) 
    9292      file_name2= strmid(file_name, 0, varpos)+var_name2+'.nc' 
    93       IF debug_w THEN print, '   file_name2 = ', file_name2 
     93      IF debug_w THEN BEGIN 
     94       print, '   file_name2 = ', file_name2 
     95      ENDIF 
    9496   ENDIF ELSE file_name2 = file_name 
    9597 
     
    104106   nya = (size(var1.data))[2] 
    105107 
    106    IF debug_w THEN print, '   nxa, nya', nxa, nya 
     108   IF debug_w THEN BEGIN 
     109    print, '   nxa, nya', nxa, nya 
     110   ENDIF 
    107111 
    108112   pt_linfit = fltarr(nxa, nya) 
     
    118122   FOR imth = 0, nmth-1 DO BEGIN 
    119123 
    120       IF debug_w THEN print, '   month idx/value: ', imth, strd[imth] 
     124      IF debug_w THEN BEGIN 
     125       print, '   month idx/value: ', imth, strd[imth] 
     126      ENDIF 
    121127 
    122128      data1 = (var1.data)[*, *, reform(idxm[imth,*], njpt)] 
     
    195201   pt_linfit = pt_linfit/float(nmth) 
    196202   pt_corr = pt_corr/float(nmth) 
    197    IF idm[0] NE -1 THEN pt_linfit[idm] = valmask 
     203   IF idm[0] NE -1 THEN BEGIN 
     204    pt_linfit[idm] = valmask 
     205   ENDIF 
    198206 
    199207  ; only take points where correlation larger than 0.2 
    200208 
    201209   idc = where(abs(pt_corr) LT corr_thres) 
    202    IF idc[0] NE -1 THEN pt_linfit[idc] = !values.f_nan 
     210   IF idc[0] NE -1 THEN BEGIN 
     211    pt_linfit[idc] = !values.f_nan 
     212   ENDIF 
    203213 
    204214   corr_txt = '[r>'+strtrim(string(corr_thres, format = '(f5.2)'), 2)+']' 
     
    245255 ;  meantsp=reform(meants,nxt*nyt) 
    246256 ;  meanlf=reform(pt_linfit,nxt*nyt) 
    247  ;  IF min (meantsp) GE 100 THEN meantsp=meantsp-273.15 
     257 ;  IF min (meantsp) GE 100 THEN BEGIN 
     258 ;    meantsp=meantsp-273.15 
     259 ;  ENDIF 
    248260 ;  pltsc, meanlf,meantsp,-70,30,20,34,"SST "+mth[strd-1], window=2 
    249261 ;  pltsc, meanlf,meantsp,-70,30,20,34,"SST "+mth[strd-1], window=2, /noerase, /ov1d, col1d=2 
  • trunk/procs/macros/make_linfitdom.pro

    r203 r205  
    9393 
    9494   file_domain = domain_db+domain+'_'+cmd1_back.exp+'_'+cmd1_back.date1+'_'+cmd1_back.spec+'.nc' 
    95    IF debug_w THEN print, '     file_domain: ', file_domain 
     95   IF debug_w THEN BEGIN 
     96    print, '     file_domain: ', file_domain 
     97   ENDIF 
    9698 
    9799   var_dom = ncdf_lec(file_domain, var = domain) 
    98100 
    99    IF debug_w THEN print, '     size of var_dom: ', size(var_dom) 
     101   IF debug_w THEN BEGIN 
     102    print, '     size of var_dom: ', size(var_dom) 
     103   ENDIF 
    100104 
    101105   IF (size(var_dom))[1] NE jpt THEN BEGIN 
     
    111115   nya = (size(var1.data))[2] 
    112116 
    113    IF debug_w THEN print, '   nxa, nya', nxa, nya 
     117   IF debug_w THEN BEGIN 
     118    print, '   nxa, nya', nxa, nya 
     119   ENDIF 
    114120 
    115121   pt_linfit = fltarr(nxa, nya) 
     
    125131   FOR imth = 0, nmth-1 DO BEGIN 
    126132 
    127       IF debug_w THEN print, '   month idx/value: ', imth, strd[imth] 
     133      IF debug_w THEN BEGIN 
     134       print, '   month idx/value: ', imth, strd[imth] 
     135      ENDIF 
    128136 
    129137      data1 = (var1.data)[*, *, reform(idxm[imth,*], njpt)] 
     
    180188   pt_linfit = pt_linfit/float(nmth) 
    181189   pt_corr = pt_corr/float(nmth) 
    182    IF idm[0] NE -1 THEN pt_linfit[idm] = valmask 
     190   IF idm[0] NE -1 THEN BEGIN 
     191    pt_linfit[idm] = valmask 
     192   ENDIF 
    183193 
    184194  ; only take points where ABS(correlation) larger than a value 
     
    229239 ;  meantsp=reform(meants,nxt*nyt) 
    230240 ;  meanlf=reform(pt_linfit,nxt*nyt) 
    231  ;  IF min (meantsp) GE 100 THEN meantsp=meantsp-273.15 
     241 ;  IF min (meantsp) GE 100 THEN BEGIN 
     242 ;   meantsp=meantsp-273.15 
     243 ;  ENDIF 
    232244 ;  pltsc, meanlf,meantsp,-70,30,20,34,"SST "+mth[strd-1], window=2 
    233245 ;  pltsc, meanlf,meantsp,-70,30,20,34,"SST "+mth[strd-1], window=2, /noerase, /ov1d, col1d=2 
  • trunk/procs/macros/make_msf.pro

    r203 r205  
    8989 
    9090   idx = where(v.data EQ valmask) 
    91    IF idx[0] NE -1 THEN v.data[idx] = 0.0 
     91   IF idx[0] NE -1 THEN BEGIN 
     92    v.data[idx] = 0.0 
     93   ENDIF 
    9294; 
    9395; Mask bathymetry ? 
  • trunk/procs/macros/make_msf2.pro

    r203 r205  
    8888 
    8989   idx = where(v.data EQ valmask) 
    90    IF idx[0] NE -1 THEN v.data[idx] = 0.0 
     90   IF idx[0] NE -1 THEN BEGIN 
     91    v.data[idx] = 0.0 
     92   ENDIF 
    9193; 
    9294; Mask bathymetry ? 
     
    111113   ENDIF 
    112114 
    113    IF jpt EQ 1 THEN v.data =reform(v.data,jpi,jpj,jpk,1) 
     115   IF jpt EQ 1 THEN BEGIN 
     116    v.data =reform(v.data,jpi,jpj,jpk,1) 
     117   ENDIF 
    114118 
    115119   strcmd = 'msf_mult, v.data, msf, msfmsk' 
     
    125129; average in box ? 
    126130 
    127    ;IF n_elements(msf_mean) GT 1 THEN BEGIN 
    128    ;    appel a proc 
    129    ;ENDIF ELSE BEGIN 
    130       ; IF msf_mean NE 0 THEN 
    131     ; appel a proc msf_indexXS 
    132    ;ENDELSE 
    133  
    134  
    135131;pas de condition : equivalent a msf_mean=0  ---> plot yz a la date T 
    136132;field = {name: '', data: 0, legend: '', units: 'm3/s', origin: '', dim: 0, direc:''} 
     
    138134 
    139135IF msf_mean EQ 2 THEN BEGIN 
    140 msf_index, msf, index 
    141 field = {name: '', data: index, legend: '', units: 'm3/s', origin: '', dim: 1, direc:'t'} 
     136 msf_index, msf, index 
     137 field = {name: '', data: index, legend: '', units: 'm3/s', origin: '', dim: 1, direc:'t'} 
    142138ENDIF 
    143139 
  • trunk/procs/macros/make_ratio.pro

    r203 r205  
    8888 
    8989  tab_var = strsplit(macro_base_fld, ',', /EXTRACT) 
    90   IF ( debug_w ) THEN print, 'size(tab_var) : ', size(tab_var) 
     90  IF ( debug_w ) THEN BEGIN 
     91   print, 'size(tab_var) : ', size(tab_var) 
     92  ENDIF 
    9193 
    9294  IF ( (size(tab_var))[1] NE 2 AND (size(tab_var))[1] NE 4 ) THEN BEGIN 
     
    116118 
    117119    idx = WHERE( diff NE 0.0 ) 
    118     IF( idx[0] EQ -1 ) THEN STOP, 'STOP. Division cannot be computed' 
     120    IF( idx[0] EQ -1 ) THEN BEGIN 
     121     STOP, 'STOP. Division cannot be computed' 
     122    ENDIF 
    119123 
    120124    div[idx] = ( var_a.data[idx] - var_b.data[idx] )/( diff[idx] ) 
     
    138142 
    139143    idx = WHERE( var_b.data NE 0.0 ) 
    140     IF( idx[0] EQ -1 ) THEN STOP, 'STOP. Division cannot be computed' 
     144    IF( idx[0] EQ -1 ) THEN BEGIN 
     145     STOP, 'STOP. Division cannot be computed' 
     146    ENDIF 
    141147 
    142148    div[idx] = ( var_a.data[idx] )/( var_b.data[idx]  ) 
  • trunk/procs/macros/make_skewness.pro

    r203 r205  
    8282; Read time serie 
    8383; 
    84    IF debug_w THEN print, 'keyword_set(ALL_DATA) : ', keyword_set(ALL_DATA) 
     84   IF debug_w THEN BEGIN 
     85    print, 'keyword_set(ALL_DATA) : ', keyword_set(ALL_DATA) 
     86   ENDIF 
    8587   mfld = nc_read(file_name, macro_base_fld, ncdf_db, BOXZOOM = boxzoom, TIME_1 = time_1, TIME_2 = time_2, ALL_DATA = all_data) 
    8688 
  • trunk/procs/macros/make_stddev.pro

    r203 r205  
    8989; Read time serie 
    9090; 
    91    IF debug_w THEN print, 'keyword_set(ALL_DATA) : ', keyword_set(ALL_DATA) 
     91   IF debug_w THEN BEGIN 
     92    print, 'keyword_set(ALL_DATA) : ', keyword_set(ALL_DATA) 
     93   ENDIF 
    9294   print, '    Warning: standard deviation assuming monthly time serie of base field ',macro_base_fld 
    9395 
     
    98100   nya = (size(mfld.data))[2] 
    99101 
    100    IF debug_w THEN print, '   nxa, nya', nxa, nya 
     102   IF debug_w THEN BEGIN 
     103    print, '   nxa, nya', nxa, nya 
     104   ENDIF 
    101105 
    102106   stdw = fltarr(nxa, nya) 
     
    109113   FOR imth = 0, nmth-1 DO BEGIN 
    110114 
    111       IF debug_w THEN print, '   month idx/value: ', imth, strd[imth] 
     115      IF debug_w THEN BEGIN 
     116       print, '   month idx/value: ', imth, strd[imth] 
     117      ENDIF 
    112118 
    113119      data = (mfld.data)[*, *, reform(idxm[imth,*], njpt)] 
     
    123129   stdw = stdw/float(nmth) 
    124130 
    125    IF idm[0] NE -1 THEN stdw[idm] = valmask 
     131   IF idm[0] NE -1 THEN BEGIN 
     132    stdw[idm] = valmask 
     133   ENDIF 
    126134 
    127135   varname = varname+' '+ntxt 
     
    131139      std_tot = a_timecorrelate(mfld.data, 0,/covariance) 
    132140      std_tot = sqrt( jpt/(jpt-1)*std_tot ) 
    133       IF idm[0] NE -1 THEN std_tot[idm] = valmask 
     141      IF idm[0] NE -1 THEN BEGIN 
     142       std_tot[idm] = valmask 
     143      ENDIF 
    134144      idx_diff = WHERE (stdw NE valmask) 
    135145      stdw[idx_diff] = stdw[idx_diff] - std_tot[idx_diff] 
  • trunk/procs/macros/make_thdepth.pro

    r203 r205  
    9999   FOR jk = 0, nzt-1-1 DO  BEGIN 
    100100      idx = where (tn.data[*, *, jk] GE 20) 
    101       IF idx[0] NE -1 THEN ik20c[idx] = jk 
     101      IF idx[0] NE -1 THEN BEGIN 
     102       ik20c[idx] = jk 
     103      ENDIF 
    102104   ENDFOR 
    103105 
     
    105107 
    106108   hd20 = gdept[ik20c] 
    107    IF debug_w THEN help, hd20 
    108    IF debug_w THEN print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     109   IF debug_w THEN BEGIN 
     110    help, hd20 
     111    print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     112   ENDIF 
    109113 
    110114   IF valmask EQ 0. THEN BEGIN 
     
    128132 
    129133;   hd20 = min(hd20, 0.) 
    130    IF debug_w THEN help, hd20 
    131    IF debug_w THEN print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     134   IF debug_w THEN BEGIN 
     135    help, hd20 
     136    print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     137   ENDIF 
    132138 
    133139 
     
    137143   field = {name: '', data: hd20, legend: '', units: '', origin: '', dim: 2, direc:'xy'} 
    138144 
    139    IF debug_w THEN print, tn.origin, tn.direc 
     145   IF debug_w THEN BEGIN 
     146    print, tn.origin, tn.direc 
     147   ENDIF 
    140148 
    141149   field.origin = tn.origin 
  • trunk/procs/macros/make_transfo.pro

    r203 r205  
    106106   idxt=where(sst eq valmask) 
    107107   idxs=where(sss eq valmask) 
    108    IF idxt[0] NE -1 THEN sst[idxt]=0. 
    109    IF idxs[0] NE -1 THEN sss[idxs]=0. 
     108   IF idxt[0] NE -1 THEN BEGIN 
     109    sst[idxt]=0. 
     110   ENDIF 
     111   IF idxs[0] NE -1 THEN BEGIN 
     112    sss[idxs]=0. 
     113   ENDIF 
    110114 
    111115; Compute potential density (sigma_0) 
    112116 
    113117   rho0 = eos[sst, sss]-1000. 
    114    IF idxs[0] NE -1 THEN rho0[idxt] = valmask 
     118   IF idxs[0] NE -1 THEN BEGIN 
     119    rho0[idxt] = valmask 
     120   ENDIF 
    115121 
    116122; Define density grid 
     
    125131   jpj = sizef[2] 
    126132   jpt = 1 
    127    IF sizef[0] EQ 3 THEN jpt = sizef[3] 
     133   IF sizef[0] EQ 3 THEN BEGIN 
     134    jpt = sizef[3] 
     135   ENDIF 
    128136 
    129137   dt = 1./float(jpt)            ; integration delta time 
  • trunk/procs/macros/make_wcurl.pro

    r203 r205  
    9191      varpos = strpos(file_name, var_name1) 
    9292      file_name2= strmid(file_name, 0, varpos)+var_name2+'.nc' 
    93       IF debug_w THEN print, '   file_name2 = ', file_name2 
     93      IF debug_w THEN BEGIN 
     94       print, '   file_name2 = ', file_name2 
     95      ENDIF 
    9496   ENDIF ELSE file_name2 = file_name 
    9597 
  • trunk/procs/macros/make_wdiv.pro

    r203 r205  
    9191      varpos = strpos(file_name, var_name1) 
    9292      file_name2= strmid(file_name, 0, varpos)+var_name2+'.nc' 
    93       IF debug_w THEN print, '   file_name2 = ', file_name2 
     93      IF debug_w THEN BEGIN 
     94       print, '   file_name2 = ', file_name2 
     95      ENDIF 
    9496   ENDIF ELSE file_name2 = file_name 
    9597 
  • trunk/procs/macros/make_wm.pro

    r203 r205  
    9696   field.direc = taux.direc 
    9797   posave = max( [strpos(ucrt.legend, ' averaged'), strpos(ucrt.legend, ' at')] ) 
    98    IF posave NE -1 THEN field.legend = strmid(ucrt.legend, posave) 
     98   IF posave NE -1 THEN BEGIN 
     99    field.legend = strmid(ucrt.legend, posave) 
     100   ENDIF 
    99101 
    100102   return, field 
  • trunk/procs/macros/make_wwv.pro

    r203 r205  
    112112   FOR jk = 0, nzt-1 DO  BEGIN 
    113113      idx = where ( tn.data[*, *, jk,*] GE thermo) 
    114       IF idx[0] NE -1 THEN ik20c[idx] = jk 
     114      IF idx[0] NE -1 THEN BEGIN 
     115       ik20c[idx] = jk 
     116      ENDIF 
    115117   ENDFOR 
    116  
    117118 
    118119; depth is a linear interpolation 
     
    122123   tempm[bad] = 0 
    123124 
    124    IF debug_w THEN help, hd20 
    125    IF debug_w THEN print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     125   IF debug_w THEN BEGIN 
     126    help, hd20 
     127    print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     128   ENDIF 
    126129 
    127130 
     
    147150;------------------------calcul du wwv------------------------------------------- 
    148151;-------------------------------------------------------------------------------- 
    149    IF debug_w THEN help, hd20 
    150    IF debug_w THEN print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     152   IF debug_w THEN BEGIN 
     153    help, hd20 
     154    print, 'min(hd20), max(hd20) : ', min(hd20), max(hd20) 
     155   ENDIF 
    151156 
    152157 
     
    168173   field = {name: '', data: wwv, legend: '', units: '', origin: '', dim: 1, direc:'t'} 
    169174 
    170    IF debug_w THEN print, tn.origin, tn.direc 
     175   IF debug_w THEN BEGIN 
     176    print, tn.origin, tn.direc 
     177   ENDIF 
    171178 
    172179   field.origin = tn.origin 
  • trunk/procs/macros/make_ytran.pro

    r203 r205  
    8888 
    8989   idx = where(v.data EQ valmask) 
    90    IF idx[0] NE -1 THEN v.data[idx] = 0.0 
     90   IF idx[0] NE -1 THEN BEGIN 
     91    v.data[idx] = 0.0 
     92   ENDIF 
    9193 
    9294;  Transport along Y : try = v*e1t*e3t (Sv) 
  • trunk/procs/mask_z.pro

    r203 r205  
    179179      'oce': BEGIN 
    180180 
    181          IF splot EQ 1 THEN vertical_domain = [sig_min, sig_max] ELSE vertical_domain = [0, depth_z] 
     181         IF splot EQ 1 THEN BEGIN 
     182          vertical_domain = [sig_min, sig_max] 
     183         ENDIF ELSE BEGIN 
     184          vertical_domain = [0, depth_z] 
     185         ENDELSE 
    182186 
    183187         CASE data_domain OF 
    184188            'equator': BEGIN 
    185189               tmask[*, *, *] = 1 
    186                IF dimplot EQ 1 THEN boite_pltz = box_h 
    187                IF dimplot EQ 2 THEN boite_pltz = [box_h, vertical_domain] 
     190               IF dimplot EQ 1 THEN BEGIN 
     191                boite_pltz = box_h 
     192               ENDIF 
     193               IF dimplot EQ 2 THEN BEGIN 
     194                boite_pltz = [box_h, vertical_domain] 
     195               ENDIF 
    188196            END 
    189197            'zonal': BEGIN 
     
    192200                boite_pltz = zbox 
    193201                IF dimplot EQ 2 THEN BEGIN 
    194                    IF n_elements(boite_pltz) EQ 4 THEN boite_pltz = [zbox, vertical_domain] 
     202                   IF n_elements(boite_pltz) EQ 4 THEN BEGIN 
     203                    boite_pltz = [zbox, vertical_domain] 
     204                   ENDIF 
    195205                ENDIF 
    196 ;               IF dimplot EQ 1 THEN boite_pltz = box_h 
    197 ;               IF dimplot EQ 2 THEN boite_pltz = [box_h, 
    198 ;               vertical_domain] 
     206;               IF dimplot EQ 1 THEN BEGIN 
     207;                boite_pltz = box_h 
     208;               ENDIF 
     209;               IF dimplot EQ 2 THEN BEGIN 
     210;                boite_pltz = [box_h,vertical_domain] 
     211;               ENDIF 
     212 
    199213                idxmsk=where(fld eq valmask) 
    200214                IF idxmsk[0] ne -1 THEN BEGIN 
     
    220234                        tmask = tmask*maskzm 
    221235                     ENDIF 
    222                      IF dimplot EQ 1 THEN boite_pltz = box_h 
     236                     IF dimplot EQ 1 THEN BEGIN 
     237                      boite_pltz = box_h 
     238                     ENDIF 
    223239                     IF dimplot EQ 2 THEN BEGIN 
    224240                        CASE strmid(cmd.plt, 1, 1) OF 
     
    251267                           maskzm = maskread(full_name, 'orca', /D3) 
    252268                           tmask = tmask*maskzm 
    253                            IF dimplot EQ 1 THEN boite_pltz = box_h 
     269                           IF dimplot EQ 1 THEN BEGIN 
     270                            boite_pltz = box_h 
     271                           ENDIF 
    254272                           IF dimplot EQ 2 THEN BEGIN 
    255273                              CASE strmid(cmd.plt, 1, 1) OF 
     
    275293                           CASE strmid(cmd.plt, 1, 1) OF 
    276294                              't': boite_pltz = zbox 
    277                               ELSE : IF n_elements(boite_pltz) EQ 4 THEN boite_pltz = [zbox, vertical_domain] 
     295                              ELSE : IF n_elements(boite_pltz) EQ 4 THEN BEGIN 
     296                                      boite_pltz = [zbox, vertical_domain] 
     297                                     ENDIF 
    278298                           ENDCASE 
    279299                        ENDIF 
     
    285305                                    'x': boite_pltz = zbox 
    286306                                    'y': boite_pltz = zbox 
    287                                     ELSE: IF n_elements(boite_pltz) EQ 4 THEN boite_pltz = [zbox, vertical_domain] 
     307                                    ELSE: IF n_elements(boite_pltz) EQ 4 THEN BEGIN 
     308                                            boite_pltz = [zbox, vertical_domain] 
     309                                          ENDIF 
    288310                                 ENDCASE 
    289311                              END 
     
    312334      ELSE: BEGIN ; atmosphere or data 
    313335 
    314 ;         IF masked_data EQ 0 THEN tmask[*] = 1 
     336;         IF masked_data EQ 0 THEN BEGIN 
     337;          tmask[*] = 1 
     338;         ENDIF 
    315339         CASE strmid(cmd.plt, 0, 2) OF 
    316340            'xy': BEGIN & char = strmid(cmd.plt,3, 1) & ideb = 4 & END 
     
    356380               CASE strmid(cmd.plt, 1, 1) OF 
    357381                  't': boite_pltz = zbox 
    358                   ELSE : IF n_elements(boite_pltz) EQ 4 THEN boite_pltz = [zbox, pres_min, pres_max] 
     382                  ELSE : IF n_elements(boite_pltz) EQ 4 THEN BEGIN 
     383                          boite_pltz = [zbox, pres_min, pres_max] 
     384                         ENDIF 
    359385               ENDCASE 
    360386            ENDIF 
  • trunk/procs/maskread.pro

    r203 r205  
    126126;--------------------------------------------------------------------- 
    127127      if n_elements(jpidta) EQ 0 THEN BEGIN 
    128          if n_elements(ixmindta) EQ 0 OR n_elements(ixmaxdta) EQ 0 then $ 
    129           jpidta = jpiglo else jpidta = ixmaxdta-ixmindta+1 
     128         if n_elements(ixmindta) EQ 0 OR n_elements(ixmaxdta) EQ 0 THEN BEGIN 
     129          jpidta = jpiglo 
     130         ENDIF ELSE BEGIN 
     131          jpidta = ixmaxdta-ixmindta+1 
     132         ENDELSE 
    130133      endif 
    131134      if n_elements(jpjdta) EQ 0 THEN BEGIN 
    132          if n_elements(iymindta) EQ 0 OR n_elements(iymaxdta) EQ 0 then $ 
    133           jpjdta = jpjglo else jpjdta = iymaxdta-iymindta+1 
     135         if n_elements(iymindta) EQ 0 OR n_elements(iymaxdta) EQ 0 THEN BEGIN 
     136          jpjdta = jpjgloo 
     137         ENDIF ELSE BEGIN 
     138          jpjdta = iymaxdta-iymindta+1 
     139         ENDELSE 
    134140      endif 
    135141      if n_elements(jpkdta) EQ 0 THEN BEGIN 
    136          if n_elements(izmindta) EQ 0 OR n_elements(izmaxdta) EQ 0 then $ 
    137           jpkdta = jpkglo else jpkdta = izmaxdta-izmindta+1 
     142         if n_elements(izmindta) EQ 0 OR n_elements(izmaxdta) EQ 0 THEN BEGIN 
     143          jpkdta = jpkglo 
     144         ENDIF ELSE BEGIN 
     145          jpkdta = izmaxdta-izmindta+1 
     146         ENDELSE 
    138147      endif 
    139148;-------------------------------------------------------------------- 
  • trunk/procs/meshes/build_mesh_glosea.pro

    r203 r205  
    106106   IF keyword_set(J_INDEX) THEN BEGIN 
    107107 
    108       IF NOT keyword_set(DELTA_J) THEN delta_j = 1 
     108      IF NOT keyword_set(DELTA_J) THEN BEGIN 
     109       delta_j = 1 
     110      ENDIF 
    109111      delta_j = delta_j - 1 
    110112 
     
    122124      no_lon_shift = no_lon_shift + 1 
    123125 
    124       IF NOT keyword_set(DELTA_I) THEN delta_i = 1 
     126      IF NOT keyword_set(DELTA_I) THEN BEGIN 
     127       delta_i = 1 
     128      ENDIF 
    125129      delta_i = delta_i - 1 
    126130 
     
    144148   IF keyword_set(K_INDEX) THEN BEGIN 
    145149 
    146       IF NOT keyword_set(DELTA_K) THEN delta_k = 1 
     150      IF NOT keyword_set(DELTA_K) THEN BEGIN 
     151       delta_k = 1 
     152      ENDIF 
    147153      delta_k = delta_k - 1 
    148154 
     
    233239 
    234240   isign=where(glamt gt 380.) 
    235    IF isign[0] NE -1 THEN glamt[isign] = glamt[isign]-360. 
     241   IF isign[0] NE -1 THEN BEGIN 
     242    glamt[isign] = glamt[isign]-360. 
     243   ENDIF 
    236244   isign=where(glamu gt 380.) 
    237    IF isign[0] NE -1 THEN glamu[isign] = glamu[isign]-360. 
     245   IF isign[0] NE -1 THEN BEGIN 
     246    glamu[isign] = glamu[isign]-360. 
     247   ENDIF 
    238248   isign=where(glamv gt 380.) 
    239    IF isign[0] NE -1 THEN glamv[isign] = glamv[isign]-360. 
     249   IF isign[0] NE -1 THEN BEGIN 
     250    glamv[isign] = glamv[isign]-360. 
     251   ENDIF 
    240252   isign=where(glamf gt 380.) 
    241    IF isign[0] NE -1 THEN glamf[isign] = glamf[isign]-360. 
     253   IF isign[0] NE -1 THEN BEGIN 
     254    glamf[isign] = glamf[isign]-360. 
     255   ENDIF 
    242256 
    243257; reduce grid to zonal mean 
  • trunk/procs/meshes/mesh_from_file.pro

    r203 r205  
    8787; masks made in data_read 
    8888; 
    89    IF strpos(ncdf_db, ':') GE 1 THEN directory = (strsplit(ncdf_db, ':', /EXTRACT))[1] $ 
    90     ELSE directory = ncdf_db 
     89   IF strpos(ncdf_db, ':') GE 1 THEN BEGIN 
     90    directory = (strsplit(ncdf_db, ':', /EXTRACT))[1] 
     91   ENDIF ELSE BEGIN 
     92    directory = ncdf_db 
     93   ENDELSE 
    9194 
    9295   s_file = directory+file_name 
     
    109112      idx = where(tmask EQ valmask) 
    110113 
    111       IF idx[0] NE -1 THEN tmask[idx] = 0. 
     114      IF idx[0] NE -1 THEN BEGIN 
     115       tmask[idx] = 0. 
     116      ENDIF 
    112117      idx = where(tmask LE 50.) 
    113118      tmask[idx] = 0. 
     
    132137         var_local = strmid(var_local, 0, idx) 
    133138         sl_pos = strpos(var_local, '/') 
    134          IF sl_pos NE -1 THEN var_local = strmid(var_local, 0, sl_pos) 
     139         IF sl_pos NE -1 THEN BEGIN 
     140          var_local = strmid(var_local, 0, sl_pos) 
     141         ENDIF 
    135142      ENDIF 
    136143 
    137       IF debug_w THEN print, '   var_local = ', var_local 
     144      IF debug_w THEN BEGIN 
     145       print, '   var_local = ', var_local 
     146      ENDIF 
    138147 
    139148      ; find valmask 
     
    147156         IF att_txt EQ 'missing_value' OR att_txt EQ 'mask value' OR att_txt EQ '_FillValue' THEN BEGIN 
    148157            ncdf_attget, cdfidl, varidl, att_txt, valmask 
    149             IF debug_w THEN print, '     valmask found = ',valmask, ' in attribute ', att_txt 
     158            IF debug_w THEN BEGIN 
     159             print, '     valmask found = ',valmask, ' in attribute ', att_txt 
     160            ENDIF 
    150161         ENDIF 
    151162      ENDFOR 
     
    164175         END 
    165176      ENDCASE 
    166       IF debug_w THEN print, '     Grid info after initncdf :' 
    167       IF debug_w THEN print, '     glamt :', size(glamt) 
    168       IF debug_w THEN print, '     gphit :', size(gphit) 
    169       IF debug_w THEN print, '     gdept :', size(gdept) 
     177      IF debug_w THEN BEGIN 
     178       print, '     Grid info after initncdf :' 
     179       print, '     glamt :', size(glamt) 
     180       print, '     gphit :', size(gphit) 
     181       print, '     gdept :', size(gdept) 
     182      ENDIF 
    170183 
    171184   ENDELSE 
  • trunk/procs/meshes/mesh_gaussian.pro

    r203 r205  
    9494   ENDIF 
    9595 
    96    IF debug_w THEN print, ' key_yreverse = ', key_yreverse 
     96   IF debug_w THEN BEGIN 
     97    print, ' key_yreverse = ', key_yreverse 
     98   ENDIF 
    9799 
    98100   CASE trunc OF 
  • trunk/procs/meshes/mesh_glosea.pro

    r197 r205  
    101101   IF keyword_set(J_INDEX) THEN BEGIN 
    102102 
    103       IF NOT keyword_set(DELTA_J) THEN delta_j = 1 
     103      IF NOT keyword_set(DELTA_J) THEN BEGIN 
     104       delta_j = 1 
     105      ENDIF 
    104106      delta_j = delta_j - 1 
    105107 
     
    117119      no_lon_shift = no_lon_shift + 1 
    118120 
    119       IF NOT keyword_set(DELTA_I) THEN delta_i = 1 
     121      IF NOT keyword_set(DELTA_I) THEN BEGIN 
     122       delta_i = 1 
     123      ENDIF 
    120124      delta_i = delta_i - 1 
    121125 
     
    139143   IF keyword_set(K_INDEX) THEN BEGIN 
    140144 
    141       IF NOT keyword_set(DELTA_K) THEN delta_k = 1 
     145      IF NOT keyword_set(DELTA_K) THEN BEGIN 
     146       delta_k = 1 
     147      ENDIF 
    142148      delta_k = delta_k - 1 
    143149 
     
    171177 
    172178   key_shift =-16 
    173    IF keyword_set(NO_SHIFT) THEN key_shift = 0 
     179   IF keyword_set(NO_SHIFT) THEN BEGIN 
     180    key_shift = 0 
     181   ENDIF 
    174182 
    175183   glamt = shift(glamt,key_shift, 0) 
     
    186194 
    187195   isign=where(glamt LE glamt[0,0]) 
    188    IF isign[0] NE -1 THEN glamt[isign] = glamt[isign]+360. 
     196   IF isign[0] NE -1 THEN BEGIN 
     197    glamt[isign] = glamt[isign]+360. 
     198   ENDIF 
    189199   isign=where(glamu LE glamu[0,0]) 
    190    IF isign[0] NE -1 THEN glamu[isign] = glamu[isign]+360. 
     200   IF isign[0] NE -1 THEN BEGIN 
     201    glamu[isign] = glamu[isign]+360. 
     202   ENDIF 
    191203 
    192204   glamv = glamu 
  • trunk/procs/meshes/mesh_micom.pro

    r203 r205  
    103103; init shift and periodicity 
    104104 
    105    IF keyword_set(NO_SHIFT) THEN key_shift = 0 
     105   IF keyword_set(NO_SHIFT) THEN BEGIN 
     106    key_shift = 0 
     107   ENDIF 
    106108 
    107109   no_lon_shift = 0 
     
    113115   IF keyword_set(J_INDEX) THEN BEGIN 
    114116 
    115       IF NOT keyword_set(DELTA_J) THEN delta_j = 1 
     117      IF NOT keyword_set(DELTA_J) THEN BEGIN 
     118       delta_j = 1 
     119      ENDIF 
    116120      delta_j = delta_j - 1 
    117121 
     
    131135      no_lon_shift = no_lon_shift + 1 
    132136 
    133       IF NOT keyword_set(DELTA_I) THEN delta_i = 1 
     137      IF NOT keyword_set(DELTA_I) THEN BEGIN 
     138       delta_i = 1 
     139      ENDIF 
    134140      delta_i = delta_i - 1 
    135141 
     
    163169   ENDELSE 
    164170 
    165    IF keyword_set(WHOLE_ARRAYS) THEN print, '                         [whole array]' 
     171   IF keyword_set(WHOLE_ARRAYS) THEN BEGIN 
     172    print, '                         [whole array]' 
     173   ENDIF 
    166174 
    167175   IF no_lon_shift EQ 0 THEN BEGIN 
     
    169177   ENDIF 
    170178 
    171    IF keyword_set(NO_SHIFT) THEN key_offset = [0, 0, 0] 
     179   IF keyword_set(NO_SHIFT) THEN BEGIN 
     180    key_offset = [0, 0, 0] 
     181   ENDIF 
    172182 
    173183   print, '     key_shift =', key_shift 
  • trunk/procs/meshes/mesh_orca.pro

    r203 r205  
    7777   ; temporary 
    7878 
    79    IF h_config EQ 'ORCA05' THEN v_config = 'L46' 
    80 ;   IF h_config EQ 'ORCA_R2' THEN v_config = 'L30' 
    81  
    82    IF NOT keyword_set(H_CONFIG) THEN h_config = 'ORCA_R2' 
    83    IF NOT keyword_set(V_CONFIG) THEN v_config = 'L30' 
     79   IF h_config EQ 'ORCA05' THEN BEGIN 
     80    v_config = 'L46' 
     81   ENDIF 
     82;   IF h_config EQ 'ORCA_R2' THEN BEGIN 
     83;    v_config = 'L30' 
     84;   ENDIF 
     85 
     86   IF NOT keyword_set(H_CONFIG) THEN BEGIN 
     87    h_config = 'ORCA_R2' 
     88   ENDIF 
     89   IF NOT keyword_set(V_CONFIG) THEN BEGIN 
     90    v_config = 'L30' 
     91   ENDIF 
    8492   print, '    Init ORCA mesh horizontal config '+h_config 
    8593   print, '                     vertical config '+v_config 
     
    133141 
    134142 
    135 ;   IF keyword_set(NO_SHIFT) THEN key_shift = 0 
    136    IF keyword_set(NO_SHIFT) THEN shift = 0 ;; key_shift = 0 
     143;   IF keyword_set(NO_SHIFT) THEN BEGIN 
     144;    key_shift = 0 
     145;   ENDIF 
     146   IF keyword_set(NO_SHIFT) THEN BEGIN 
     147    shift = 0 
     148    key_shift = 0 
     149   ENDIF 
    137150   no_lon_shift = 0 
    138151 
     
    144157   IF keyword_set(J_INDEX) THEN BEGIN 
    145158 
    146       IF NOT keyword_set(DELTA_J) THEN delta_j = 1 
     159      IF NOT keyword_set(DELTA_J) THEN BEGIN 
     160       delta_j = 1 
     161      ENDIF 
    147162      delta_j = delta_j - 1 
    148163 
     
    160175      no_lon_shift = no_lon_shift + 1 
    161176 
    162       IF NOT keyword_set(DELTA_I) THEN delta_i = 1 
     177      IF NOT keyword_set(DELTA_I) THEN BEGIN 
     178       delta_i = 1 
     179      ENDIF 
    163180      delta_i = delta_i - 1 
    164181 
     
    179196   IF keyword_set(K_INDEX) THEN BEGIN 
    180197 
    181       IF NOT keyword_set(DELTA_K) THEN delta_k = 1 
     198      IF NOT keyword_set(DELTA_K) THEN BEGIN 
     199       delta_k = 1 
     200      ENDIF 
    182201      delta_k = delta_k - 1 
    183202 
     
    244263 
    245264   print, '                         mask config '+orca_mask_version 
    246    IF keyword_set(WHOLE_ARRAYS) THEN print, '                         [whole array]' 
     265   IF keyword_set(WHOLE_ARRAYS) THEN BEGIN 
     266    print, '                         [whole array]' 
     267   ENDIF 
    247268         
    248269   sm_file = hom_idl+'grids/'+mesmsk 
     
    331352   varexp = varexpp 
    332353 
    333    IF keyword_set(NO_SHIFT) THEN key_offset = [0, 0, 0] 
     354   IF keyword_set(NO_SHIFT) THEN BEGIN 
     355    key_offset = [0, 0, 0] 
     356   ENDIF 
    334357 
    335358   print, '     key_shift =', key_shift 
    336    IF debug_w THEN print, '     vargrid, varexp at exit = ',vargrid, varexp 
     359   IF debug_w THEN BEGIN 
     360    print, '     vargrid, varexp at exit = ',vargrid, varexp 
     361   ENDIF 
    337362 
    338363   print, '    End of ORCA mesh config ' 
  • trunk/procs/meshes/mesh_pcmdi.pro

    r203 r205  
    5757 
    5858   print,'   Model inits for ', model 
    59    IF debug_w THEN print, '     varexp at start of mesh_pcmdi:', varexp 
     59   IF debug_w THEN BEGIN 
     60    print, '     varexp at start of mesh_pcmdi:', varexp 
     61   ENDIF 
    6062 
    6163   varexpp = varexp 
     
    8789   ENDIF 
    8890 
    89    IF debug_w THEN print, '      key_yreverse = ', key_yreverse 
     91   IF debug_w THEN BEGIN 
     92    print, '      key_yreverse = ', key_yreverse 
     93   ENDIF 
    9094 
    9195   IF res NE 'NOT FOUND' THEN BEGIN 
     
    9498      res_grid = execute(cmd_grid) 
    9599 
    96       IF debug_w THEN print, '      Found mask from ',sm_file 
     100      IF debug_w THEN BEGIN 
     101       print, '      Found mask from ',sm_file 
     102      ENDIF 
    97103 
    98104      tmask = byte(read_ncdf('sftlf', 0, 0, /timestep, file = sm_file, /nostruct)) 
    99105 
    100106      idx = where(tmask EQ valmask) 
    101       IF idx[0] NE -1 THEN tmask[idx] = 0. 
     107      IF idx[0] NE -1 THEN BEGIN 
     108       tmask[idx] = 0. 
     109      ENDIF 
    102110 
    103111      idx = where(tmask LE 50.) 
     
    108116   ENDIF 
    109117 
    110    IF debug_w THEN print, '      key_shift = ', key_shift 
    111    IF debug_w THEN print, '      key_yreverse = ', key_yreverse 
     118   IF debug_w THEN BEGIN 
     119    print, '      key_shift = ', key_shift 
     120    print, '      key_yreverse = ', key_yreverse 
     121   ENDIF 
    112122 
    113123   masked_data = 0 
  • trunk/procs/meshes/mesh_regular.pro

    r203 r205  
    8989   jpi = floor(360./deltax) 
    9090   jpj = floor(180./deltay) 
    91    IF keyword_set(EQUATOR) THEN jpj = jpj + 1 
     91   IF keyword_set(EQUATOR) THEN BEGIN 
     92    jpj = jpj + 1 
     93   ENDIF 
    9294   jpk = 1 
    9395 
     
    99101; 1.  Define longitudes 
    100102 
    101    IF NOT keyword_set(inilon) THEN  inilon = 0. 
     103   IF NOT keyword_set(inilon) THEN BEGIN 
     104    inilon = 0. 
     105   ENDIF 
    102106 
    103107   glamt = 360.0*findgen(jpi)/float(jpi)+inilon 
     
    152156   ENDIF 
    153157 
    154    IF keyword_set(REVERSE_Y) THEN gphit = reverse(gphit) 
     158   IF keyword_set(REVERSE_Y) THEN BEGIN 
     159    gphit = reverse(gphit) 
     160   ENDIF 
    155161   gphit = replicate(1, jpi)#gphit 
    156162 
     
    170176; Use the computegrid routine 
    171177   cmd_grid = 'computegrid, XAXIS = glamt, YAXIS = gphit, MASK = tmask, GLAMBOUNDARY = glamboundary, /FULLCGRID'+shift_txt+periodic_txt+idx_txt 
    172    IF debug_w THEN print, cmd_grid 
     178   IF debug_w THEN BEGIN 
     179    print, cmd_grid 
     180   ENDIF 
    173181   res = execute( cmd_grid ) 
    174182 
  • trunk/procs/meshes/mesh_tao.pro

    r203 r205  
    4444 
    4545   jpi = 86L & jpj = 21L & jpk = 51L & key_shift = 0 
    46    IF keyword_set(NO_SHIFT) THEN key_shift = 0 
     46   IF keyword_set(NO_SHIFT) THEN BEGIN 
     47    key_shift = 0 
     48   ENDIF 
    4749 
    4850   jpiglo = jpi 
  • trunk/procs/meshes/mesh_um.pro

    r203 r205  
    239239; Shift re-init U,V,F 
    240240 
    241    IF keyword_set(NO_SHIFT) THEN key_shift = 0 
     241   IF keyword_set(NO_SHIFT) THEN BEGIN 
     242    key_shift = 0 
     243   ENDIF 
    242244 
    243245   glamu = glamt 
  • trunk/procs/msf_mult.pro

    r203 r205  
    7272 ENDIF 
    7373 
    74 IF n_elements(jpl) EQ 0 THEN jpl = jpj 
     74IF n_elements(jpl) EQ 0 THEN BEGIN 
     75 jpl = jpj 
     76ENDIF 
    7577; 
    7678;  jpl bandes de latitudes 
  • trunk/procs/msf_simple.pro

    r203 r205  
    7373 ENDIF 
    7474 
    75 IF n_elements(jpl) EQ 0 THEN jpl = jpj 
     75IF n_elements(jpl) EQ 0 THEN BEGIN 
     76 jpl = jpj 
     77ENDIF 
    7678; 
    7779;  jpl bandes de latitudes 
  • trunk/procs/mth_decode.pro

    r203 r205  
    3838      nmth = (size(strd))[1] 
    3939      njpt = n_elements((lindgen(jpt))[0:*:12]) 
    40       IF debug_w THEN print, '   nmth,njpt', nmth, njpt 
     40      IF debug_w THEN BEGIN 
     41       print, '   nmth,njpt', nmth, njpt 
     42      ENDIF 
    4143 
    4244      idxm = lonarr(nmth, njpt) 
     
    4648      ENDFOR 
    4749 
    48       IF nmth EQ 1 THEN ntxt = mth[strd-1] 
     50      IF nmth EQ 1 THEN BEGIN 
     51       ntxt = mth[strd-1] 
     52      ENDIF 
    4953 
    5054      print, '    Warning: monthly computation and average for following period: ', ntxt 
  • trunk/procs/nc_put.pro

    r203 r205  
    203203 
    204204   cdfid = ncdf_create(ncdf_db+file_name, /clobber) 
    205    IF debug_w THEN print, '    type,cdfid = ', type, cdfid 
     205   IF debug_w THEN BEGIN 
     206    print, '    type,cdfid = ', type, cdfid 
     207   ENDIF 
    206208   ncdf_control, cdfid, /fill 
    207209 
     
    240242   tid = ncdf_dimdef(cdfid, 'time', /UNLIMITED) 
    241243 
    242    IF debug_w THEN print, '    dim check ', dim_check 
     244   IF debug_w THEN BEGIN 
     245    print, '    dim check ', dim_check 
     246   ENDIF 
    243247 
    244248   IF dim_check NE dim[0] THEN BEGIN 
     
    251255 
    252256   ; horizontal zonal axis 
    253    IF debug_w THEN print, '    building zonal axis, xid: ', xid 
     257   IF debug_w THEN BEGIN 
     258    print, '    building zonal axis, xid: ', xid 
     259   ENDIF 
    254260;   IF strpos(type, 'x') NE -1 AND keyword_set(X) THEN BEGIN 
    255261      IF strpos (type, 'xy') NE -1 THEN BEGIN 
     
    264270 
    265271   ; horizontal meridional axis 
    266    IF debug_w THEN print, '    building Y axis, yid: ', yid 
     272   IF debug_w THEN BEGIN 
     273    print, '    building Y axis, yid: ', yid 
     274   ENDIF 
    267275   IF strpos (type, 'xy') NE -1 THEN BEGIN 
    268276      latid = ncdf_vardef(cdfid,'lat', [xid, yid], /FLOAT) 
     
    275283 
    276284   ; vertical axis 
    277    IF debug_w THEN print, '    building Z axis, zid: ', zid 
     285   IF debug_w THEN BEGIN 
     286    print, '    building Z axis, zid: ', zid 
     287   ENDIF 
    278288   IF zpos NE -1 AND keyword_set(Z) THEN BEGIN 
    279289      vertid = ncdf_vardef(cdfid,z.name, [zid], /FLOAT) 
     
    286296 
    287297   ; time axis 
    288    IF debug_w THEN print, '    building T axis, tid: ', tid 
     298   IF debug_w THEN BEGIN 
     299    print, '    building T axis, tid: ', tid 
     300   ENDIF 
    289301   IF tpos NE -1 AND keyword_set(T) THEN BEGIN 
    290302      mid = NCDF_VARDEF(cdfid, 'time', [tid], /long) 
     
    315327   ENDELSE 
    316328 
    317    IF debug_w THEN print, '    test 1 fld.short_name = ', fld.short_name 
    318    IF debug_w THEN print, '    swx,y,z,t = ', swx, swy, swz, swt 
     329   IF debug_w THEN BEGIN 
     330    print, '    test 1 fld.short_name = ', fld.short_name 
     331    print, '    swx,y,z,t = ', swx, swy, swz, swt 
     332   ENDIF 
    319333 
    320334; field attributes 
    321335 
    322    IF debug_w THEN print, '    type, size fld.data ', type, size(fld.data) 
     336   IF debug_w THEN BEGIN 
     337    print, '    type, size fld.data ', type, size(fld.data) 
     338   ENDIF 
    323339 
    324340   varn = strcompress(fld.short_name, /remove_all) 
  • trunk/procs/nc_read.pro

    r203 r205  
    123123 ENDIF 
    124124 
    125    IF NOT keyword_set(TIME_1) THEN time_1 = 1 
    126    IF NOT keyword_set(TIME_2) THEN time_2 = time_1 
    127    IF debug_w THEN print, '  Before read_ncdf, key_yreverse=', key_yreverse 
     125   IF NOT keyword_set(TIME_1) THEN BEGIN 
     126    time_1 = 1 
     127   ENDIF 
     128   IF NOT keyword_set(TIME_2) THEN BEGIN 
     129    time_2 = time_1 
     130   ENDIF 
     131   IF debug_w THEN BEGIN 
     132    print, '  Before read_ncdf, key_yreverse=', key_yreverse 
     133   ENDIF 
    128134 
    129135; decide which subdomain of data to read 
    130    IF debug_w THEN print, '     keyword_set(ALL_DATA) : ', keyword_set(ALL_DATA) 
     136   IF debug_w THEN BEGIN 
     137    print, '     keyword_set(ALL_DATA) : ', keyword_set(ALL_DATA) 
     138   ENDIF 
    131139   IF keyword_set(ALL_DATA) THEN BEGIN 
    132140      tout = 1 
     
    139147 
    140148; local directory 
    141    IF strpos(ncdf_db, ':') GE 1 THEN directory = (strsplit(ncdf_db, ':', /EXTRACT))[1] $ 
    142     ELSE directory = ncdf_db 
     149   IF strpos(ncdf_db, ':') GE 1 THEN BEGIN 
     150    directory = (strsplit(ncdf_db, ':', /EXTRACT))[1] 
     151   ENDIF ELSE BEGIN 
     152    directory = ncdf_db 
     153   ENDELSE 
    143154 
    144155; Find the variable's attribute 
     
    148159; By default units for the Z axis are meters 
    149160   IF n_elements(gdept) GT 1 THEN BEGIN 
    150       IF name_level NE '-' THEN $ 
    151        ncdf_getatt, directory+file_name, name_level, units = units_depth ELSE units_depth = 'm' 
     161      IF name_level NE '-' THEN BEGIN 
     162       ncdf_getatt, directory+file_name, name_level, units = units_depth 
     163      ENDIF ELSE BEGIN 
     164       units_depth = 'm' 
     165      ENDELSE 
    152166   ENDIF ELSE units_depth = '' 
    153167 
     
    155169; of time steps found in the file. 
    156170   jpt_max = find_jptmax(file_name, IODIRECTORY = directory) 
    157    IF time_2-time_1+1 GT jpt_max AND jpt_max NE -1 THEN time_2 = time_1+jpt_max-1 
     171   IF time_2-time_1+1 GT jpt_max AND jpt_max NE -1 THEN BEGIN 
     172    time_2 = time_1+jpt_max-1 
     173   ENDIF 
    158174 
    159175; Read the data with a call to read_ncdf 
    160    IF debug_w THEN print, '     ' 
    161    IF debug_w THEN print, '     Reading raw data from ', file_name 
    162    IF debug_w AND keyword_set(boxzoom) THEN print, '    boxzoom before=', boxzoom 
     176   IF debug_w THEN BEGIN 
     177    print, '     ' 
     178    print, '     Reading raw data from ', file_name 
     179    IF keyword_set(boxzoom) THEN BEGIN 
     180     print, '    boxzoom before=', boxzoom 
     181    ENDIF 
     182   ENDIF 
    163183 
    164184   lec_data = read_ncdf(var_name, time_1-1, time_2-1, BOXZOOM = boxzoom, FILENAME = directory+file_name, $ 
     
    171191   ENDIF 
    172192 
    173    IF debug_w THEN print, '     ' 
    174    IF debug_w AND keyword_set(boxzoom) THEN print, '    boxzoom after=', boxzoom 
    175    IF debug_w THEN print, '    firstxt,firstyt,firstzt=', firstxt, firstyt, firstzt 
    176    IF debug_w THEN print, '    lastxt,lastyt,lastzt=', lastxt, lastyt, lastzt 
    177    IF debug_w THEN print, '    zinvar=', zinvar 
    178    IF debug_w THEN print, '     jpt=', jpt 
    179    IF debug_w THEN print, '     key_shift=', key_shift 
    180    IF debug_w THEN print, '     After read_ncdf, key_yreverse=',key_yreverse 
    181    IF debug_w THEN print, '     ' 
     193   IF debug_w THEN BEGIN 
     194    print, '     ' 
     195    IF keyword_set(boxzoom) THEN BEGIN 
     196     print, '    boxzoom after=', boxzoom 
     197    ENDIF 
     198    print, '    firstxt,firstyt,firstzt=', firstxt, firstyt, firstzt 
     199    print, '    lastxt,lastyt,lastzt=', lastxt, lastyt, lastzt 
     200    print, '    zinvar=', zinvar 
     201    print, '     jpt=', jpt 
     202    print, '     key_shift=', key_shift 
     203    print, '     After read_ncdf, key_yreverse=',key_yreverse 
     204    print, '     ' 
     205   ENDIF 
    182206 
    183207; Average data along vertical if needed and update some features 
     
    200224; replace NaN with valmask 
    201225;   idx_t = where (~finite(field.data)) 
    202 ;   IF idx_t[0] NE -1 THEN field.data(idx_t) = valmask 
     226;   IF idx_t[0] NE -1 THEN BEGIN 
     227;    field.data(idx_t) = valmask 
     228;   ENDIF 
    203229 
    204230; get valmask (might need valmask = float(string(valmask)) 
     
    210236         print, '      *** Warning valmask is negative - changing sign: ', valmask 
    211237         idx_t = where (field.data EQ valmask) 
    212          IF idx_t[0] NE -1 THEN field.data[idx_t] = -valmask 
     238         IF idx_t[0] NE -1 THEN BEGIN 
     239          field.data[idx_t] = -valmask 
     240         ENDIF 
    213241         valmask = -valmask 
    214242         idx_t=0                ; free memory 
  • trunk/procs/overlay_type.pro

    r203 r205  
    119119   overc = ',ov1d='+strtrim(string((iover-1) < 1), 2) 
    120120 
    121    IF iover EQ 1 THEN overc = ',ov1d=0' 
     121   IF iover EQ 1 THEN BEGIN 
     122    overc = ',ov1d=0' 
     123   ENDIF 
    122124 
    123125; overlay color 
     
    125127   colov = '' 
    126128 
    127    IF dimplot EQ 1 THEN index_over = index_over + 1 
     129   IF dimplot EQ 1 THEN BEGIN 
     130    index_over = index_over + 1 
     131   ENDIF 
    128132   IF index_over EQ 1 THEN BEGIN 
    129133 ;     index_over = 2 
     
    138142   ENDIF 
    139143 
    140    IF pal_type EQ 'col' AND index_over GE 1 THEN colov = ',COLOR='+string(line_color[index_over-1]) 
     144   IF pal_type EQ 'col' AND index_over GE 1 THEN BEGIN 
     145    colov = ',COLOR='+string(line_color[index_over-1]) 
     146   ENDIF 
    141147 
    142148; overlay thickness 
     
    150156; result 
    151157 
    152    IF dimplot EQ 1 THEN overc = overc+colov+line_thick_txt+line_style_txt 
    153 ;   IF dimplot EQ 2 THEN overc = overc+line_thick_txt+line_style_txt 
    154    IF dimplot EQ 2 THEN overc = overc+line_style_txt 
     158   IF dimplot EQ 1 THEN BEGIN 
     159    overc = overc+colov+line_thick_txt+line_style_txt 
     160   ENDIF 
     161;   IF dimplot EQ 2 THEN BEGIN 
     162;    overc = overc+line_thick_txt+line_style_txt 
     163;   ENDIF 
     164   IF dimplot EQ 2 THEN BEGIN 
     165    overc = overc+line_style_txt 
     166   ENDIF 
    155167 
    156168   return, overc 
  • trunk/procs/plt_map.pro

    r203 r205  
    116116   cmd_wrk = cmd 
    117117 
    118    IF cmd.on EQ 2 THEN stop 
     118   IF cmd.on EQ 2 THEN BEGIN 
     119    stop 
     120   ENDIF 
    119121; 
    120122; incompatible options of plt_def and post_it 
     
    161163 
    162164   CASE cmd.plt OF 
    163    'xyt': BEGIN & plttyp = 'plt' & hotyp = 'xyt'  & dimplot = 2 & END 
     165   'xyt': BEGIN 
     166           plttyp = 'plt' 
     167           hotyp = 'xyt' 
     168           dimplot = 2 
     169          END 
    164170       ELSE: 
    165171   ENDCASE 
     
    220226   spectplt = 0 
    221227   IF strpos(cmd.plt, '@s') GE 1 THEN BEGIN 
    222       IF hotyp EQ 't' THEN spectplt = 1 ELSE BEGIN 
    223          print, '    *** spectrum [@s] applies to 1D time serie only (t_<box>)' 
    224          stop 
     228      IF hotyp EQ 't' THEN BEGIN 
     229       spectplt = 1 
     230      ENDIF ELSE BEGIN 
     231       print, '    *** spectrum [@s] applies to 1D time serie only (t_<box>)' 
     232       stop 
    225233      ENDELSE 
    226234      cmd.plt = strmid(cmd.plt, 0, strpos(cmd.plt, '@s')) 
     
    231239   waveplt = 0 
    232240   IF strpos(cmd.plt, '@w') GE 1 THEN BEGIN 
    233       IF hotyp EQ 't' THEN waveplt = 1 ELSE BEGIN 
    234          print, '    *** wavelet [@w] applies to 1D time serie only (t_<box>)' 
    235          stop 
     241      IF hotyp EQ 't' THEN BEGIN 
     242       waveplt = 1 
     243      ENDIF ELSE BEGIN 
     244       print, '    *** wavelet [@w] applies to 1D time serie only (t_<box>)' 
     245       stop 
    236246      ENDELSE 
    237247      cmd.plt = strmid(cmd.plt, 0, strpos(cmd.plt, '@w')) 
     
    257267   sw_diffg = 0 
    258268   def_grid, cmd 
    259    IF debug_w THEN  print, '   after def_grid in plt_map: cmd.grid/varexp/vargrid ',cmd.grid,' ', varexp, ' ', vargrid 
     269   IF debug_w THEN BEGIN 
     270    print, '   after def_grid in plt_map: cmd.grid/varexp/vargrid ',cmd.grid,' ', varexp, ' ', vargrid 
     271   ENDIF 
    260272 
    261273; vertical average if 3D field 
    262274   vert_switch = 0 
    263    IF plttyp EQ 'plt' AND vert_type ne '0' THEN vert_switch = 1 
    264    IF plttyp EQ 'pltt' AND vert_type ne '0' THEN vert_switch = 1 
    265    IF plttyp EQ 'plt1d' AND vert_type ne '0' THEN vert_switch = 1 
    266    IF plt1dtyp EQ 'z' THEN vert_switch = 0 
     275   IF plttyp EQ 'plt' AND vert_type ne '0' THEN BEGIN 
     276    vert_switch = 1 
     277   ENDIF 
     278   IF plttyp EQ 'pltt' AND vert_type ne '0' THEN BEGIN 
     279    vert_switch = 1 
     280   ENDIF 
     281   IF plttyp EQ 'plt1d' AND vert_type ne '0' THEN BEGIN 
     282    vert_switch = 1 
     283   ENDIF 
     284   IF plt1dtyp EQ 'z' THEN BEGIN 
     285    vert_switch = 0 
     286   ENDIF 
    267287 
    268288; read all data if netcdf output 
    269289 
    270    IF debug_w THEN print, '    force_all_data_read in pltmap: ', force_all_data_read 
     290   IF debug_w THEN BEGIN 
     291    print, '    force_all_data_read in pltmap: ', force_all_data_read 
     292   ENDIF 
    271293 
    272294   IF cmd.out NE 'cdf' THEN BEGIN 
     
    274296   ENDIF ELSE BEGIN 
    275297      all_data_str = ',/ALL_DATA' 
    276    END 
     298   ENDELSE 
    277299 
    278300; =========== 
     
    287309      printf, nulhis, strcompress(pltcmd) 
    288310      printf, nulhis, ' ' 
    289       IF execute(pltcmd) EQ 0 THEN stop 
     311      IF execute(pltcmd) EQ 0 THEN BEGIN 
     312       stop 
     313      ENDIF 
    290314   ENDELSE 
    291315 
    292316; data specific treatments 
    293    IF cmd.var EQ 'sla' THEN field.origin = 'diff' 
     317   IF cmd.var EQ 'sla' THEN BEGIN 
     318    field.origin = 'diff' 
     319   ENDIF 
    294320   IF cmd.var EQ 'sosstsst' AND cmd.exp EQ 'HadISST1' THEN BEGIN 
    295321      ; limit data to -1.8 C 
    296322      idx = where(field.data EQ valmask) 
    297323      field.data = field.data > (-1.8) 
    298       IF idx[0] NE -1 THEN field.data[idx] = valmask 
     324      IF idx[0] NE -1 THEN BEGIN 
     325       field.data[idx] = valmask 
     326      ENDIF 
    299327   ENDIF 
    300328 
    301329help, field,/structure 
    302    IF n_elements(field.data) EQ 1 THEN stop 
     330   IF n_elements(field.data) EQ 1 THEN BEGIN 
     331    stop 
     332   ENDIF 
    303333 
    304334; change cmd.var if macro 
     
    307337         cmd.var = field.name 
    308338         cmd.var = STRMID(cmd.var, 2, 15) 
    309          IF debug_w THEN print, 'cmd.var : ', cmd.var 
     339         IF debug_w THEN BEGIN 
     340          print, 'cmd.var : ', cmd.var 
     341         ENDIF 
    310342      END 
    311343      ELSE: 
    312344   ENDCASE 
    313    IF vecplot EQ 1 THEN BEGIN   ; vectors case 
     345   IF vecplot EQ 1 THEN BEGIN 
     346      ; vectors case 
    314347      CASE STRMID(cmd.var2, 0, 2) OF 
    315          '@@': begin 
     348         '@@': BEGIN 
    316349            cmd.var2 = STRMID(cmd.var2, 2, 15) 
    317350         END 
     
    321354 
    322355; spectum plot 
    323    IF spectplt EQ 1 THEN plttyp = 'spec' 
     356   IF spectplt EQ 1 THEN BEGIN 
     357    plttyp = 'spec' 
     358   ENDIF 
    324359; wavelet plot 
    325    IF waveplt EQ 1 THEN plttyp = 'wavelet' 
     360   IF waveplt EQ 1 THEN BEGIN 
     361    plttyp = 'wavelet' 
     362   ENDIF 
    326363 
    327364   xlogax = '' 
     
    339376      e3w_b = e3w 
    340377      tmask_b = tmask 
    341 ;      IF cmd.var EQ 'vosigvol' THEN xlogax = ',xlog = 1' 
     378;      IF cmd.var EQ 'vosigvol' THEN BEGIN 
     379;       xlogax = ',xlog = 1' 
     380;      ENDIF 
    342381;  modify vertical grid -> sigma 
    343382      n_sig = (sig_max - sig_min)/sig_del + 1 
     
    360399   END 
    361400 
    362    IF debug_w THEN print, '   cmd after data_read in plt_map = ', cmd 
     401   IF debug_w THEN BEGIN 
     402    print, '   cmd after data_read in plt_map = ', cmd 
     403   ENDIF 
    363404; 
    364405; ====================== 
     
    377418      'ybinx': BEGIN 
    378419         ; if var3 exists then var = var1/var3 
    379          IF var3_ybinx NE "" THEN var_att = cmd.var+"/"+var3_ybinx ELSE var_att = cmd.var 
     420         IF var3_ybinx NE "" THEN BEGIN 
     421          var_att = cmd.var+"/"+var3_ybinx 
     422         ENDIF ELSE BEGIN 
     423          var_att = cmd.var 
     424         ENDELSE 
    380425      END 
    381426      ELSE: var_att = cmd.var 
    382427   ENDCASE 
    383428 
    384    IF debug_w THEN print, '    Looking for min/max/iso attributes for variable :', var_att 
     429   IF debug_w THEN BEGIN 
     430    print, '    Looking for min/max/iso attributes for variable :', var_att 
     431   ENDIF 
    385432 
    386433; extremum 
     
    409456   fldatt.mid = fldint.mid 
    410457 
    411    IF debug_w THEN print, 'plt_map 1 :', fldatt.mult, fldatt.add, fldatt.min, fldatt.max 
    412  
    413    IF fldatt.mult NE 1. OR fldatt.add NE 0. THEN field.units = fldatt.unit 
     458   IF debug_w THEN BEGIN 
     459    print, 'plt_map 1 :', fldatt.mult, fldatt.add, fldatt.min, fldatt.max 
     460   ENDIF 
     461 
     462   IF fldatt.mult NE 1. OR fldatt.add NE 0. THEN BEGIN 
     463    field.units = fldatt.unit 
     464   ENDIF 
    414465   fld = field.data*fldatt.mult + fldatt.add 
    415    IF (where(field.data EQ valmask))[0] NE -1 THEN $ 
     466   IF (where(field.data EQ valmask))[0] NE -1 THEN BEGIN 
    416467    fld[where(field.data EQ valmask)] = valmask 
     468   ENDIF 
    417469 
    418470;  field 2 if needed 
    419471 
    420    IF  plttyp EQ 'yfx' OR plttyp EQ 'ybinx' OR  vecplot EQ 1 THEN  BEGIN 
     472   IF  plttyp EQ 'yfx' OR plttyp EQ 'ybinx' OR  vecplot EQ 1 THEN BEGIN 
    421473      fldatt2 = fldatt 
    422474 
     
    441493      fldatt2.mid = fldint2.mid 
    442494 
    443       IF fldatt2.mult NE 1. OR fldatt2.add NE 0. THEN field.units2 = fldatt2.unit 
     495      IF fldatt2.mult NE 1. OR fldatt2.add NE 0. THEN BEGIN 
     496       field.units2 = fldatt2.unit 
     497      ENDIF 
    444498      fld2 = field.data2*fldatt2.mult + fldatt2.add 
    445       IF (where(field.data2 EQ valmask))[0] NE -1 THEN $ 
     499      IF (where(field.data2 EQ valmask))[0] NE -1 THEN BEGIN 
    446500       fld2[where(field.data2 EQ valmask)] = valmask 
     501      ENDIF 
    447502 
    448503   ENDIF 
     
    450505;  field 3 if needed 
    451506 
    452    IF  plttyp EQ 'ybinx' AND var3_ybinx NE "" THEN  BEGIN 
     507   IF  plttyp EQ 'ybinx' AND var3_ybinx NE "" THEN BEGIN 
    453508      fldatt3 = fldatt 
    454509 
     
    473528      fldatt3.mid = fldint3.mid 
    474529 
    475       IF fldatt3.mult NE 1. OR fldatt3.add NE 0. THEN field.units3 = fldatt3.unit 
     530      IF fldatt3.mult NE 1. OR fldatt3.add NE 0. THEN BEGIN 
     531       field.units3 = fldatt3.unit 
     532      ENDIF 
    476533      fld3 = field.data3*fldatt3.mult + fldatt3.add 
    477       IF (where(field.data3 EQ valmask))[0] NE -1 THEN $ 
     534      IF (where(field.data3 EQ valmask))[0] NE -1 THEN BEGIN 
    478535       fld3[where(field.data3 EQ valmask)] = valmask 
     536      ENDIF 
    479537 
    480538   ENDIF 
     
    509567      'yfx': varlegend2 = field.legend2+trd_txt+' ('+field.units2+')' 
    510568      'ybinx': BEGIN 
    511          IF strmid(cmd2.trend, 0, 1) EQ '4' THEN varlegend = field.legend2+trd_txt+' ('+field.units2+')' $ 
    512           ELSE varlegend = field.legend2+' ('+field.units2+')' 
     569         IF strmid(cmd2.trend, 0, 1) EQ '4' THEN BEGIN 
     570          varlegend = field.legend2+trd_txt+' ('+field.units2+')' 
     571         ENDIF ELSE BEGIN 
     572          varlegend = field.legend2+' ('+field.units2+')' 
     573         ENDELSE 
    513574         varlegend2 = field.legend+trd_txt+' ('+field.units+')' 
    514575      END 
    515576      ELSE: BEGIN 
    516          IF run_stddev GT 0 THEN trd_txt = trd_txt+' running Std Dev ['+string(run_stddev, format = '(I3)')+']' 
     577         IF run_stddev GT 0 THEN BEGIN 
     578          trd_txt = trd_txt+' running Std Dev ['+string(run_stddev, format = '(I3)')+']' 
     579         ENDIF 
    517580      END 
    518581   ENDCASE 
     
    523586      '1m': BEGIN 
    524587         mn = def_month(cmd.timave, cmd.date1) 
    525          IF strmid(cmd.timave, 0, 3) EQ '1mm' THEN $ 
    526           date_txt = mn+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' $ 
    527          ELSE date_txt = mn+' '+strmid(cmd.date1, 0, strlen(cmd.date1)-2) 
     588         IF strmid(cmd.timave, 0, 3) EQ '1mm' THEN BEGIN 
     589          date_txt = mn+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' 
     590         ENDIF ELSE BEGIN 
     591          date_txt = mn+' '+strmid(cmd.date1, 0, strlen(cmd.date1)-2) 
     592         ENDELSE 
    528593      END 
    529594      '3m': BEGIN 
    530595         mn = def_month(cmd.timave, cmd.date1) 
    531          IF strmid(cmd.timave, 0, 3) EQ '3mm' THEN $ 
    532           date_txt = mn+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' $ 
    533          ELSE date_txt = mn+' '+strmid(cmd.date1, 0, strlen(cmd.date1)-2) 
     596         IF strmid(cmd.timave, 0, 3) EQ '3mm' THEN BEGIN 
     597          date_txt = mn+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' 
     598         ENDIF ELSE BEGIN 
     599          date_txt = mn+' '+strmid(cmd.date1, 0, strlen(cmd.date1)-2) 
     600         ENDELSE 
    534601      END 
    535602      '6m': BEGIN 
    536603         mn = def_month(cmd.timave, cmd.date1) 
    537          IF strmid(cmd.timave, 0, 3) EQ '6mm' THEN $ 
    538           date_txt = mn+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' $ 
    539          ELSE date_txt = mn+' '+strmid(cmd.date1, 0, strlen(cmd.date1)-2) 
     604         IF strmid(cmd.timave, 0, 3) EQ '6mm' THEN BEGIN 
     605          date_txt = mn+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' 
     606         ENDIF ELSE BEGIN 
     607          date_txt = mn+' '+strmid(cmd.date1, 0, strlen(cmd.date1)-2) 
     608         ENDELSE 
    540609      END 
    541610      ELSE:date_txt = cmd.timave+' '+cmd.date1 
     
    545614      'pltt':BEGIN 
    546615         date_txt = cmd.timave 
    547          IF strmid(cmd.timave, 1, 2) EQ 'mm' THEN $ 
     616         IF strmid(cmd.timave, 1, 2) EQ 'mm' THEN BEGIN 
    548617          date_txt = cmd.timave+' ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' 
     618         ENDIF 
    549619      END 
    550620      'yfx': BEGIN 
    551          IF hotyp NE '-' THEN date_txt = cmd.timave+' '+cmd.date1+' '+cmd.spec 
     621         IF hotyp NE '-' THEN BEGIN 
     622          date_txt = cmd.timave+' '+cmd.date1+' '+cmd.spec 
     623         ENDIF 
    552624      END 
    553625      'ybinx': BEGIN 
    554          IF hotyp NE '-' THEN date_txt = cmd.timave+' '+cmd.date1+' '+cmd.spec 
     626         IF hotyp NE '-' THEN BEGIN 
     627          date_txt = cmd.timave+' '+cmd.date1+' '+cmd.spec 
     628         ENDIF 
    555629      END 
    556630      'wavelet': BEGIN 
    557631         date_txt = cmd.timave+' Wavelet' 
    558          IF strmid(cmd.timave, 1, 2) EQ 'mm' THEN $ 
     632         IF strmid(cmd.timave, 1, 2) EQ 'mm' THEN BEGIN 
    559633          date_txt = cmd.timave+' Wavelet ('+strmid(cmd.date1, 3, strlen(cmd.date1)-3)+')' 
     634         ENDIF 
    560635      END 
    561636      ELSE: 
     
    566641; defined if fraction of x/y.range is added to plot domain 
    567642 
    568 ;   IF free_1d_minmax EQ 'no' THEN fraction = 0. ELSE fraction = 1.0 
     643;   IF free_1d_minmax EQ 'no' THEN BEGIN 
     644;    fraction = 0. 
     645;   ENDIF ELSE BEGIN 
     646;    fraction = 1.0 
     647;   ENDELSE 
    569648   fraction = 0. 
    570649 
     
    601680               minc2 = -fldatt2.dmax & maxc2 = fldatt2.dmax 
    602681            ENDIF 
    603             IF debug_w THEN print, '   minc/maxc for 1d fld1/fld2', minc, maxc, minc2, maxc2 
     682            IF debug_w THEN BEGIN 
     683             print, '   minc/maxc for 1d fld1/fld2', minc, maxc, minc2, maxc2 
     684            ENDIF 
    604685         END 
    605686         ELSE: BEGIN & minc = 0. &  maxc = 0. & END 
     
    622703            print, '    '+cmd.var, ' plot attributes ('+plttyp+') : min/max/int=', $ 
    623704             minc, maxc, fldatt.int 
    624             IF ( fldatt.mult NE 1.0 OR  fldatt.add NE 0.0 ) THEN $ 
     705            IF ( fldatt.mult NE 1.0 OR  fldatt.add NE 0.0 ) THEN BEGIN 
    625706             print, '     --> Modify field using : ', 'mult/add=' , $ 
    626707             fldatt.mult, fldatt.add, '    to obtain :    ', fldatt.unit 
     708            ENDIF 
    627709         END 
    628710         1: BEGIN 
    629711            print, '    '+cmd.var, ' plot attributes ('+plttyp+') : min/max=',minc, maxc 
    630             IF ( fldatt.mult NE 1.0 OR  fldatt.add NE 0.0 ) THEN $ 
     712            IF ( fldatt.mult NE 1.0 OR  fldatt.add NE 0.0 ) THEN BEGIN 
    631713             print, '     --> Modify field using : ', 'mult/add=' , $ 
    632714             fldatt.mult, fldatt.add, '    to obtain :    ', fldatt.unit 
     715            ENDIF 
    633716         END 
    634717         0: BEGIN 
    635718            print, '    '+cmd.var, ' plot attributes ('+plttyp+') : min/max=',minc, maxc 
    636             IF ( fldatt.mult NE 1.0 OR  fldatt.add NE 0.0 ) THEN $ 
     719            IF ( fldatt.mult NE 1.0 OR  fldatt.add NE 0.0 ) THEN BEGIN 
    637720             print, '     --> Modify field using : ', 'mult/add=' , $ 
    638721             fldatt.mult, fldatt.add, '    to obtain :    ', fldatt.unit 
     722            ENDIF 
    639723            print, '    '+cmd.var2, ' plot attributes ('+plttyp+') : min/max=',minc2, maxc2 
    640             IF ( fldatt2.mult NE 1.0 OR  fldatt2.add NE 0.0 ) THEN $ 
     724            IF ( fldatt2.mult NE 1.0 OR  fldatt2.add NE 0.0 ) THEN BEGIN 
    641725             print, '     --> Modify field using : ', 'mult/add=' , $ 
    642726             fldatt2.mult, fldatt2.add, '    to obtain :    ', fldatt2.unit 
     727            ENDIF 
    643728         END 
    644729         ELSE: 
     
    666751      ENDELSE 
    667752      IF long(fldatt.int) NE 0 THEN BEGIN 
    668          IF fldatt.int/long(fldatt.int) NE 1 THEN fmt = '(f5.1)' 
     753         IF fldatt.int/long(fldatt.int) NE 1 THEN BEGIN 
     754          fmt = '(f5.1)' 
     755         ENDIF 
    669756      ENDIF 
    670757      colbarfor = ', format = '''+fmt+'''' 
     
    696783 
    697784   nocoltxt = '' 
    698    IF nofill EQ 1 THEN nocoltxt = ',NOCOULEUR=1' 
    699  
    700    IF dimplot NE 2 THEN nofill = 1 
     785   IF nofill EQ 1 THEN BEGIN 
     786    nocoltxt = ',NOCOULEUR=1' 
     787   ENDIF 
     788 
     789   IF dimplot NE 2 THEN BEGIN 
     790    nofill = 1 
     791   ENDIF 
    701792 
    702793   nocolorbar = 0 
    703    IF col_palette EQ 'no' THEN nocolorbar = 1 
    704    IF pal_type EQ '2dom' THEN nocolorbar = 1 
    705    IF iover GT 1 THEN nocolorbar = 1 
    706    IF dimplot NE 2 THEN nocolorbar = 1 
    707  
     794   IF col_palette EQ 'no' THEN BEGIN 
     795    nocolorbar = 1 
     796   ENDIF 
     797   IF pal_type EQ '2dom' THEN BEGIN 
     798    nocolorbar = 1 
     799   ENDIF 
     800   IF iover GT 1 THEN BEGIN 
     801    nocolorbar = 1 
     802   ENDIF 
     803   IF dimplot NE 2 THEN BEGIN 
     804    nocolorbar = 1 
     805   ENDIF 
    708806   IF cmd.out NE 'cdf' THEN BEGIN 
    709807      readpal = 0 
    710       IF nofill EQ 0 AND dimplot GT 1 THEN readpal = 1 
    711       IF waveplt EQ 1 THEN readpal = 2 
    712       IF field.origin EQ 'div' AND plttyp NE 'pltt' THEN readpal = 3 
     808      IF nofill EQ 0 AND dimplot GT 1 THEN BEGIN 
     809       readpal = 1 
     810      ENDIF 
     811      IF waveplt EQ 1 THEN BEGIN 
     812       readpal = 2 
     813      ENDIF 
     814      IF field.origin EQ 'div' AND plttyp NE 'pltt' THEN BEGIN 
     815       readpal = 3 
     816      ENDIF 
    713817      ;; Necessary for correlation plots (overlay of 2D fields) 
    714       IF dimplot GT 1 AND nover GT 1 AND iover GT 1 THEN readpal = 1 
     818      IF dimplot GT 1 AND nover GT 1 AND iover GT 1 THEN BEGIN 
     819       readpal = 1 
     820      ENDIF 
    715821      IF readpal GE 1 THEN BEGIN 
    716822         lec_pal_gmt, cmd.var, c_anot_str, fmt, found, readpal 
     
    722828            min_palette = min(levels_gmt) 
    723829            max_palette = max(levels_gmt) 
    724             IF finite(minc) NE 0 THEN minc = min([minc, min_palette]) ELSE minc = min_palette 
    725             IF finite(maxc) NE 0 THEN maxc = max([maxc, max_palette]) ELSE maxc = max_palette 
     830            IF finite(minc) NE 0 THEN BEGIN 
     831             minc = min([minc, min_palette]) 
     832            ENDIF ELSE BEGIN 
     833             minc = min_palette 
     834            ENDELSE 
     835            IF finite(maxc) NE 0 THEN BEGIN 
     836             maxc = max([maxc, max_palette]) 
     837            ENDIF ELSE BEGIN 
     838             maxc = max_palette 
     839            ENDELSE 
    726840            print, '    '+cmd.var, ' plot attributes ('+plttyp+') modified via color palette: min/max=', $ 
    727841    minc, maxc 
     
    759873; vertical grid type 
    760874; 
    761    IF debug_w THEN print, '    splot=', splot 
     875   IF debug_w THEN BEGIN 
     876    print, '    splot=', splot 
     877   ENDIF 
    762878   CASE mesh_type OF 
    763879      'oce': BEGIN 
     
    780896   strcont ='' 
    781897   IF mesh_type NE 'oce' THEN BEGIN 
    782       IF cont_fill EQ 0 THEN strcont = ',/CONT_NOFILL, nite=0' 
    783       IF cont_real GE 1 THEN strcont = strcont+', REALCONT = '+string(strtrim(cont_real, 2))+', COAST_THICK = 2' 
     898      IF cont_fill EQ 0 THEN BEGIN 
     899       strcont = ',/CONT_NOFILL, nite=0' 
     900      ENDIF 
     901      IF cont_real GE 1 THEN BEGIN 
     902       strcont = strcont+', REALCONT = '+string(strtrim(cont_real, 2))+', COAST_THICK = 2' 
     903      ENDIF 
    784904   ENDIF 
    785905 
     
    787907 
    788908   cal_typ = '' 
    789    IF calendar_type GT 1 THEN cal_typ = ',ndayspm=calendar_type' 
     909   IF calendar_type GT 1 THEN BEGIN 
     910    cal_typ = ',ndayspm=calendar_type' 
     911   ENDIF 
    790912 
    791913; titles options 
     
    802924 
    803925   filltxt = '' 
    804    IF fill_space EQ 1 THEN filltxt = ',/rempli' 
     926   IF fill_space EQ 1 THEN BEGIN 
     927    filltxt = ',/rempli' 
     928   ENDIF 
    805929 
    806930; axis charsize option (x/ychartxt read from plt_def) 
     
    812936; add contour_options not overlay 
    813937 
    814    IF iover EQ 1 THEN com_strplt = com_strplt+contour_options 
    815  
    816    IF debug_w THEN print, '   Cmd before making output in plt_map = ', cmd 
    817  
    818    IF debug_w THEN print, '   We are in plt_map: ' 
     938   IF iover EQ 1 THEN BEGIN 
     939    com_strplt = com_strplt+contour_options 
     940   ENDIF 
     941 
     942   IF debug_w THEN BEGIN 
     943    print, '   Cmd before making output in plt_map = ', cmd 
     944    print, '   We are in plt_map: ' 
     945   ENDIF 
     946 
    819947   @zoom_indices_debug 
    820948 
     
    8771005          mask_z, fld, cmd, boite_plt1d, dimplot 
    8781006          fld = checkfield(fld, 'pltt', type = datyp.hotyp, boite = boite_plt1d) 
    879           IF debug_w THEN print, 'size(fld)', size(fld) 
    880           IF debug_w THEN print, 'boite_plt1d', boite_plt1d 
     1007          IF debug_w THEN BEGIN 
     1008           print, 'size(fld)', size(fld) 
     1009           print, 'boite_plt1d', boite_plt1d 
     1010          ENDIF 
    8811011          IF cmd.trend GT 0 THEN BEGIN 
    8821012             fld = trends(fld, cmd.trend, datyp.hotyp) 
    8831013             add_txt = trd_txt 
    884           ENDIF ELSE print, 'You need to have a trend to make 1D netcdf output' 
     1014          ENDIF ELSE BEGIN 
     1015             print, 'You need to have a trend to make 1D netcdf output' 
     1016          ENDELSE 
    8851017       END 
    8861018       ELSE: BEGIN ; $$$$$$$$$$$$$$$$$$$$$$$$$$   make plot   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 
     
    8891021             print, '   Plot type (plttyp) = ', plttyp 
    8901022          ENDIF 
    891          Case plttyp OF 
     1023         CASE plttyp OF 
    8921024            'plt': BEGIN 
    8931025         ; 
     
    9201052 
    9211053 
    922                   IF hotyp EQ 'xyt' THEN date_txt = 'monthly' 
     1054                  IF hotyp EQ 'xyt' THEN BEGIN 
     1055                   date_txt = 'monthly' 
     1056                  ENDIF 
    9231057 
    9241058                  pltcmd = 'plt,{a:fld, d:'''+date_txt+''', n:'''+edd_txt+varlegend+' '+legbox+legsurf+''', u:'''+field.units+filleg+''', g:'''+vargrid+'''}'+mincmd+maxcmd+intcmd+com_strplt+strcont+map_cmd 
     
    9461080               ENDELSE 
    9471081 
    948                IF debug_w THEN print, strcompress(pltcmd) 
     1082               IF debug_w THEN BEGIN 
     1083                print, strcompress(pltcmd) 
     1084               ENDIF 
    9491085               printf, nulhis, strcompress(pltcmd) 
    9501086               res = execute(pltcmd[0]) 
     
    9801116               sz = size(fld) 
    9811117               IF sz[0] EQ 2 THEN BEGIN 
    982                   IF sz[1] EQ 1 OR sz[2] EQ 1 THEN fld = reform(fld, sz[1]*sz[2]) 
     1118                  IF sz[1] EQ 1 OR sz[2] EQ 1 THEN BEGIN 
     1119                   fld = reform(fld, sz[1]*sz[2]) 
     1120                  ENDIF 
    9831121               ENDIF 
    9841122               IF sz[0] EQ 3 THEN BEGIN 
    985                   IF sz[1] EQ 1 THEN fld = reform(fld, sz[2], sz[3]) 
    986                   IF sz[2] EQ 1 THEN fld = reform(fld, sz[1], sz[3]) 
    987                   IF sz[3] EQ 1 THEN fld = reform(fld, sz[1], sz[2]) 
     1123                  IF sz[1] EQ 1 THEN BEGIN 
     1124                   fld = reform(fld, sz[2], sz[3]) 
     1125                  ENDIF 
     1126                  IF sz[2] EQ 1 THEN BEGIN 
     1127                   fld = reform(fld, sz[1], sz[3]) 
     1128                  ENDIF 
     1129                  IF sz[3] EQ 1 THEN BEGIN 
     1130                   fld = reform(fld, sz[1], sz[2]) 
     1131                  ENDIF 
    9881132               ENDIF 
    9891133 
     
    9971141               IF vecplot EQ 0 THEN BEGIN 
    9981142 
    999                   IF cmd.var EQ 'vozonbsf' THEN xindstr = ', /xindex' ELSE xindstr = '' 
     1143                  IF cmd.var EQ 'vozonbsf' THEN BEGIN 
     1144                   xindstr = ', /xindex' 
     1145                  ENDIF ELSE BEGIN 
     1146                   xindstr = '' 
     1147                  ENDELSE 
    10001148 
    10011149                  pltcmd = 'pltz,{a:fld, d:'''+date_txt+''', n:'''+varlegend+'   '+legz+''', u:'''+field.units+''', g:'''+vargrid+'''}'+mincmd+maxcmd+intcmd+',/'+pltztyp+', boite=boite_pltz'+zoom_txt+com_strplt+xindstr 
     
    10131161               ENDELSE 
    10141162 
    1015                IF debug_w THEN print, pltcmd 
     1163               IF debug_w THEN BEGIN 
     1164                print, pltcmd 
     1165               ENDIF 
    10161166               printf, nulhis, strcompress(pltcmd) 
    10171167               res = execute(pltcmd[0]) 
     
    10191169 
    10201170               ; overlay bowl if sig_bowl=1 
    1021                IF sig_bowl EQ 1 THEN begin 
     1171               IF sig_bowl EQ 1 THEN BEGIN 
    10221172                  ; define line color, thickness and type 
    10231173                  iover = 2 
    10241174                  overc = overlay_type(iover, dimplot) 
    10251175                  ; type of latitude axis 
    1026                   IF strmid(cmd.plt, 0, 1) EQ 'y' AND lat_axis EQ 'sin' THEN $ 
    1027                    sin = ',/sin' ELSE sin = '' 
     1176                  IF strmid(cmd.plt, 0, 1) EQ 'y' AND lat_axis EQ 'sin' THEN BEGIN 
     1177                   sin = ',/sin' 
     1178                  ENDIF ELSE BEGIN 
     1179                   sin = '' 
     1180                  ENDELSE 
    10281181                  plt1dtyp = strmid(pltztyp, 0, 1) 
    10291182                  noerase = 1 
    10301183                  com_strplt = ', NOERASE = '+string(noerase) 
    10311184                  pltcmd = 'plt1d,field.bowl,/'+plt1dtyp+', boite=boite_pltz'+overc+sin+com_strplt 
    1032                   IF debug_w THEN print, pltcmd 
     1185                  IF debug_w THEN BEGIN 
     1186                   print, pltcmd 
     1187                  ENDIF 
    10331188 
    10341189                  res = execute(pltcmd[0]) 
     
    10491204               sz = size(fld) 
    10501205               IF sz[0] EQ 2 THEN BEGIN 
    1051                   IF sz[1] EQ 1 OR sz[2] EQ 1 THEN fld = reform(fld, sz[1]*sz[2]) 
     1206                  IF sz[1] EQ 1 OR sz[2] EQ 1 THEN BEGIN 
     1207                   fld = reform(fld, sz[1]*sz[2]) 
     1208                  ENDIF 
    10521209               ENDIF 
    10531210               IF sz[0] EQ 3 THEN BEGIN 
    1054                   IF sz[1] EQ 1 THEN fld = reform(fld, sz[2], sz[3]) 
    1055                   IF sz[2] EQ 1 THEN fld = reform(fld, sz[1], sz[3]) 
    1056                   IF sz[3] EQ 1 THEN fld = reform(fld, sz[1], sz[2]) 
     1211                  IF sz[1] EQ 1 THEN BEGIN 
     1212                   fld = reform(fld, sz[2], sz[3]) 
     1213                  ENDIF 
     1214                  IF sz[2] EQ 1 THEN BEGIN 
     1215                   fld = reform(fld, sz[1], sz[3]) 
     1216                  ENDIF 
     1217                  IF sz[3] EQ 1 THEN BEGIN 
     1218                   fld = reform(fld, sz[1], sz[2]) 
     1219                  ENDIF 
    10571220               ENDIF 
    10581221            ; mask fld 
    10591222               mask_z, fld, cmd, boite_plt1d, dimplot, legz 
    10601223 
    1061                IF debug_w THEN print, boite_plt1d 
     1224               IF debug_w THEN BEGIN 
     1225                print, boite_plt1d 
     1226               ENDIF 
    10621227               niveau = 1 
    10631228            ; define line color, thickness and type 
    10641229               overc = overlay_type(iover, dimplot) 
    10651230            ; type of latitude axis 
    1066                IF strmid(cmd.plt, 0, 1) EQ 'y' AND lat_axis EQ 'sin' THEN $ 
    1067                 sin = ',/sin' ELSE sin = '' 
     1231               IF strmid(cmd.plt, 0, 1) EQ 'y' AND lat_axis EQ 'sin' THEN BEGIN 
     1232                sin = ',/sin' 
     1233               ENDIF ELSE BEGIN 
     1234                sin = '' 
     1235               ENDELSE 
    10681236 
    10691237               print, '     '+cmd.var+' data to plot min and max :            ', $ 
     
    10771245               printf, nulhis, 'boite_plt1d=',boite_plt1d 
    10781246               printf, nulhis, strcompress(pltcmd) 
    1079                IF debug_w THEN print, pltcmd 
     1247               IF debug_w THEN BEGIN 
     1248                print, pltcmd 
     1249               ENDIF 
    10801250               res = execute(pltcmd[0]) 
    10811251 
     
    10951265 
    10961266            ; mask fld 
    1097                mask_z, fld, cmd, boite_pltt, dimplot, legz 
     1267            mask_z, fld, cmd, boite_pltt, dimplot, legz 
    10981268            ; define line color, thickness and type 
    1099                overc = overlay_type(iover, dimplot) 
     1269            overc = overlay_type(iover, dimplot) 
    11001270            ; define additional text for pltt 
    1101                @add_txt_pltt 
     1271            @add_txt_pltt 
    11021272 
    11031273            ; compute mean and time rms if hoytp='t' 
     
    11261296 
    11271297               IF common_time EQ 1 THEN BEGIN 
    1128                   IF iover EQ 1 THEN time_prev = time ELSE time = time_prev 
    1129                ENDIF 
    1130  
    1131                IF st_rms EQ 1 THEN BEGIN ; time series of rms deviation on a sigma surface 
     1298                  IF iover EQ 1 THEN BEGIN 
     1299                   time_prev = time 
     1300                  ENDIF ELSE BEGIN 
     1301                   time = time_prev 
     1302                  ENDELSE 
     1303               ENDIF 
     1304 
     1305               IF st_rms EQ 1 THEN BEGIN 
     1306                  ; time series of rms deviation on a sigma surface 
    11321307                  @densit_pltmap_plot 
    11331308               ENDIF ELSE BEGIN 
     
    11371312               printf, nulhis, 'boite_pltt=',boite_pltt 
    11381313               printf, nulhis, strcompress(pltcmd) 
    1139                IF debug_w THEN print, pltcmd 
     1314               IF debug_w THEN BEGIN 
     1315                print, pltcmd 
     1316               ENDIF 
     1317 
    11401318               res = execute(pltcmd[0]) 
    1141                IF iover EQ 4 THEN print, 'There might be a pb with the legends !' 
     1319               IF iover EQ 4 THEN BEGIN 
     1320                print, 'There might be a pb with the legends !' 
     1321               ENDIF 
    11421322               ; legend if plot=t 
    11431323               IF hotyp EQ 't' THEN BEGIN 
    11441324                  ; positions of the legend depend on nb_cycles 
    11451325                  ; it is different from 1 only with 1mm case 
    1146                   IF cmd.timave NE '1mm' THEN nb_cycles = 1 
     1326                  IF cmd.timave NE '1mm' THEN BEGIN 
     1327                   nb_cycles = 1 
     1328                  ENDIF 
    11471329                  @legend_overlay 
    11481330               ENDIF 
     
    11741356               fld = checkfield(fld, 'pltt', type = 't', boite = boite_pltspec, _EXTRA=extra) 
    11751357            ; apply trends 
    1176                IF long(cmd.trend) GT 0 THEN fld = trends(fld, long(cmd.trend), 't') 
     1358               IF long(cmd.trend) GT 0 THEN BEGIN 
     1359                fld = trends(fld, long(cmd.trend), 't') 
     1360               ENDIF 
    11771361 
    11781362            ; make spectrum 
     
    12431427               printf, nulhis, 'boite_pltspec=',boite_pltspec 
    12441428               printf, nulhis, strcompress(pltcmd) 
    1245                IF debug_w THEN print, pltcmd 
     1429               IF debug_w THEN BEGIN 
     1430                print, pltcmd 
     1431               ENDIF 
    12461432               res = execute(pltcmd[0]) 
    12471433 
     
    12641450               fld = checkfield(fld, 'pltt', type = 't', boite = boite_pltspec, _EXTRA=extra) 
    12651451            ; apply trends 
    1266                IF long(cmd.trend) GT 0 THEN fld = trends(fld, long(cmd.trend), 't') 
     1452               IF long(cmd.trend) GT 0 THEN BEGIN 
     1453                fld = trends(fld, long(cmd.trend), 't') 
     1454               ENDIF 
    12671455 
    12681456            ; make spectrum 
     
    12921480               printf, nulhis, 'boite_pltspec=',boite_pltspec 
    12931481               printf, nulhis, strcompress(pltcmd) 
    1294                IF debug_w THEN print, pltcmd 
     1482               IF debug_w THEN BEGIN 
     1483                print, pltcmd 
     1484               ENDIF 
    12951485               res = execute(pltcmd[0]) 
    12961486               contour,abs(wave)^2/signif,time,period, /overplot,level=1.0,c_annot='95%' 
  • trunk/procs/saxo_mods/ncdf_meshmicom.pro

    r203 r205  
    5252; set default glamboundary 
    5353;--------------------------------------------------------- 
    54    IF n_elements(glamboundary) NE 2 THEN glamboundary = [20, 380] 
     54   IF n_elements(glamboundary) NE 2 THEN BEGIN 
     55    glamboundary = [20, 380] 
     56   ENDIF 
    5557 
    5658;--------------------------------------------------------- 
     
    7678   glamu = temporary(glamu) MOD 360 
    7779   smaller = where(glamu LT glamboundary[0]) 
    78    if smaller[0] NE -1 then glamu[smaller] = glamu[smaller]+360 
     80   if smaller[0] NE -1 THEN BEGIN 
     81    glamu[smaller] = glamu[smaller]+360 
     82   ENDIF 
    7983   bigger = where(glamu GE glamboundary[1]) 
    80    if bigger[0] NE -1 then glamu[bigger] = glamu[bigger]-360 
     84   if bigger[0] NE -1 THEN BEGIN 
     85    glamu[bigger] = glamu[bigger]-360 
     86   ENDIF 
    8187   glamv = temporary(glamv) MOD 360 
    8288   smaller = where(glamv LT glamboundary[0]) 
    83    if smaller[0] NE -1 then glamv[smaller] = glamv[smaller]+360 
     89   if smaller[0] NE -1 THEN BEGIN 
     90    glamv[smaller] = glamv[smaller]+360 
     91   ENDIF 
    8492   bigger = where(glamv GE glamboundary[1]) 
    85    if bigger[0] NE -1 then glamv[bigger] = glamv[bigger]-360 
     93   if bigger[0] NE -1 THEN BEGIN 
     94    glamv[bigger] = glamv[bigger]-360 
     95   ENDIF 
    8696   glamf = temporary(glamf) MOD 360 
    8797   smaller = where(glamf LT glamboundary[0]) 
    88    if smaller[0] NE -1 then glamf[smaller] = glamf[smaller]+360 
     98   if smaller[0] NE -1 THEN BEGIN 
     99    glamf[smaller] = glamf[smaller]+360 
     100   ENDIF 
    89101   bigger = where(glamf GE glamboundary[1]) 
    90    if bigger[0] NE -1 then glamf[bigger] = glamf[bigger]-360 
     102   if bigger[0] NE -1 THEN BEGIN 
     103    glamf[bigger] = glamf[bigger]-360 
     104   ENDIF 
    91105   toosmall = where(glamu EQ glamboundary[0]) 
    92    IF toosmall[0] NE -1 THEN glamu[toosmall] = glamu[toosmall] + 360 
     106   IF toosmall[0] NE -1 THEN BEGIN 
     107    glamu[toosmall] = glamu[toosmall] + 360 
     108   ENDIF 
    93109   toosmall = where(glamf EQ glamboundary[0]) 
    94    IF toosmall[0] NE -1 THEN glamf[toosmall] = glamf[toosmall] + 360 
     110   IF toosmall[0] NE -1 THEN BEGIN 
     111    glamf[toosmall] = glamf[toosmall] + 360 
     112   ENDIF 
    95113 
    96114;--------------------------------------------------------- 
  • trunk/procs/saxo_mods/pltsc.pro

    r203 r205  
    102102 
    103103; Rq: on ne reinitialise pas qd on rapelle pltsc 
    104    IF NOT keyword_set(ov1d) THEN reinitplt 
    105    IF NOT keyword_set(thickn) THEN thickn = 2 
    106    IF NOT keyword_set(fraction) THEN fraction = 1. 
     104   IF NOT keyword_set(ov1d) THEN BEGIN 
     105    reinitplt 
     106   ENDIF 
     107   IF NOT keyword_set(thickn) THEN BEGIN 
     108    thickn = 2 
     109   ENDIF 
     110   IF NOT keyword_set(fraction) THEN BEGIN 
     111    fraction = 1. 
     112   ENDIF 
    107113   ;; reduce data xyzt domain 
    108114 
    109115   oldboite = [lon1, lon2, lat1, lat2, prof1, prof2] 
    110116   IF keyword_set(boite) THEN BEGIN 
    111       IF n_elements(integration3d) EQ 0 THEN integration3d = n_elements(boite) NE 4 
     117      IF n_elements(integration3d) EQ 0 THEN BEGIN 
     118       integration3d = n_elements(boite) NE 4 
     119      ENDIF 
    112120      CASE 1 Of 
    113121         N_Elements(Boite) Eq 1:bte=[lon1, lon2, lat1, lat2, 0.,boite[0]] 
     
    134142 
    135143; deal with min and max of plot 
    136    IF finite(min1) EQ 0 THEN min1 = min(tab1) 
    137    IF finite(max1) EQ 0 THEN max1 = max(tab1) 
    138    IF finite(min2) EQ 0 THEN min2 = min(tab2) 
    139    IF finite(max2) EQ 0 THEN max2 = max(tab2) 
     144   IF finite(min1) EQ 0 THEN BEGIN 
     145    min1 = min(tab1) 
     146   ENDIF 
     147   IF finite(max1) EQ 0 THEN BEGIN 
     148    max1 = max(tab1) 
     149   ENDIF 
     150   IF finite(min2) EQ 0 THEN BEGIN 
     151    min2 = min(tab2) 
     152   ENDIF 
     153   IF finite(max2) EQ 0 THEN BEGIN 
     154    max2 = max(tab2) 
     155   ENDIF 
    140156 
    141157 
    142158; init plot if not overlay 
    143159 
    144    IF NOT keyword_set(ov1d) THEN placedessin, 'yfx', posfenetre, posbar, $ 
     160   IF NOT keyword_set(ov1d) THEN BEGIN 
     161    placedessin, 'yfx', posfenetre, posbar, $ 
    145162    contour = contour, _EXTRA=EXTRA 
     163   ENDIF 
    146164   yy = tab1 
    147165   xx = tab2 
     
    154172   !y.range = [min1-fraction*abs(max1-min1)/5.,max1+fraction*abs(max1-min1)/5.] 
    155173 
    156    IF (NOT keyword_set(sty1d)) THEN sty1d = 0 
    157    IF (NOT keyword_set(col1d)) THEN col1d = 0 
    158    IF  NOT keyword_set(ov1d) THEN  BEGIN 
     174   IF (NOT keyword_set(sty1d)) THEN BEGIN 
     175    sty1d = 0 
     176   ENDIF 
     177   IF (NOT keyword_set(col1d)) THEN BEGIN 
     178    col1d = 0 
     179   ENDIF 
     180   IF NOT keyword_set(ov1d) THEN BEGIN 
    159181      legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA=extra 
    160182; 
     
    164186      IF n_elements(ex) NE 0 THEN BEGIN 
    165187; pour avoir un cadre de la couleur c_cote et trace une ligne a y=0 
    166          IF (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 THEN ex.COLOR = c_cote 
    167          IF (where(tag_names(ex) EQ 'LINESTYLE'))[0] NE -1 THEN ex.LINESTYLE= 0 
     188         IF (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 THEN BEGIN 
     189          ex.COLOR = c_cote 
     190         ENDIF 
     191         IF (where(tag_names(ex) EQ 'LINESTYLE'))[0] NE -1 THEN BEGIN 
     192          ex.LINESTYLE= 0 
     193         ENDIF 
    168194      ENDIF 
    169195      plot, !x.range, [0, 0],/noerase,color=c_cote, xstyle = 1, ystyle = 1, _EXTRA=extra 
     
    180206   terminedessin, _EXTRA=extra 
    181207;------------------------------------------------------------ 
    182    IF n_elements(key_performance) NE 0 THEN $ 
    183     IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 
     208   IF n_elements(key_performance) NE 0 THEN BEGIN 
     209    IF key_performance EQ 1 THEN BEGIN 
     210     print, 'temps plt1d', systime(1)-tempsun 
     211    ENDIF 
     212   ENDIF 
    184213END 
  • trunk/procs/saxo_mods/plttg.pro

    r203 r205  
    333333;-------------------------------------------------------------- 
    334334   if n_elements(contour) ne 4 AND NOT keyword_set(overplot) $ 
    335     AND NOT keyword_set(ov1d) then reinitplt 
     335    AND NOT keyword_set(ov1d) THEN BEGIN 
     336    reinitplt 
     337   ENDIF 
    336338;-------------------------------------------------------------- 
    337339; I1) lecture du champ 
    338340;-------------------------------------------------------------- 
    339    if keyword_set(boite) then oldboite = [lon1, lon2, lat1, lat2, prof1, prof2] 
    340    if n_elements(giventype) NE 0 then type = giventype 
    341    if n_elements(givenmin) NE 0 then min = givenmin 
    342    if n_elements(givenmax) NE 0 then max = givenmax 
    343    if n_elements(minin) NE 0 then min = minin 
    344    if n_elements(maxin) NE 0 then max = maxin 
    345    if keyword_set(typein) then BEGIN 
    346       if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 
    347          if n_elements(min) NE 0 then max = min 
     341   if keyword_set(boite) THEN BEGIN 
     342    oldboite = [lon1, lon2, lat1, lat2, prof1, prof2] 
     343   ENDIF 
     344   if n_elements(giventype) NE 0 THEN BEGIN 
     345    type = giventype 
     346   ENDIF 
     347   if n_elements(givenmin) NE 0 THEN BEGIN 
     348    min = givenmin 
     349   ENDIF 
     350   if n_elements(givenmax) NE 0 THEN BEGIN 
     351    max = givenmax 
     352   ENDIF 
     353   if n_elements(minin) NE 0 THEN BEGIN 
     354    min = minin 
     355   ENDIF 
     356   if n_elements(maxin) NE 0 THEN BEGIN 
     357    max = maxin 
     358   ENDIF 
     359   if keyword_set(typein) THEN BEGIN 
     360      if size(type, /type) NE 7 AND size(type, /type) NE 0 THEN BEGIN 
     361         if n_elements(min) NE 0 THEN BEGIN 
     362          max = min 
     363         ENDIF 
    348364         min = type 
    349       endif 
     365      ENDIF 
    350366      type = typein 
    351367   ENDIF 
     
    361377;--------------------------------------------------------------- 
    362378 
    363    IF NOT keyword_set(repeat_c) THEN repeat_c = 1 
     379   IF NOT keyword_set(repeat_c) THEN BEGIN 
     380    repeat_c = 1 
     381   ENDIF 
    364382 
    365383   temps = time[0:jpt-1] 
     
    384402   autoscale = testvar(var = min) EQ testvar(var = max) AND NOT keyword_set(intervalle) 
    385403   determineminmax, z2d, mask, mi, ma, MININ = min, MAXIN = max, nan = nan, INTERVALLE = intervalle 
    386    if z2d[0] EQ -1 THEN return 
     404   if z2d[0] EQ -1 THEN BEGIN 
     405    return 
     406   ENDIF 
    387407; on fait un autoscale si besoin 
    388    if autoscale then autoscale, min, max, intervalle 
    389 ;----------------------------------------------------------------------------- 
    390 ;----------------------------------------------------------------------------- 
    391    if n_elements(contour) ne 4  AND NOT keyword_set(overplot) THEN $ 
     408   if autoscale THEN BEGIN 
     409    autoscale, min, max, intervalle 
     410   ENDIF 
     411;----------------------------------------------------------------------------- 
     412;----------------------------------------------------------------------------- 
     413   if n_elements(contour) ne 4  AND NOT keyword_set(overplot) THEN BEGIN 
    392414    placedessin, 'pltt',posfenetre, posbar, contour = contour, direc = direc, type = type, endpoints = endpoints, _EXTRA=extra 
     415   ENDIF 
    393416;-------------------------------------------------------------- 
    394417;-------------------------------------------------------------- 
     
    427450   xx = temps-tempsmin 
    428451;-------------------------------------------------------------- 
    429    if NOT keyword_set(overplot) THEN axe, type, tempsmin, tempsmax, plttg = 1, _EXTRA=extra ELSE BEGIN 
     452   if NOT keyword_set(overplot) THEN BEGIN 
     453    axe, type, tempsmin, tempsmax, plttg = 1, _EXTRA=extra 
     454   ENDIF ELSE BEGIN 
    430455      !x.range=!x.range-tempsmin 
    431456      !x.tickv=!x.tickv-tempsmin 
     
    440465; choix des labels 
    441466;----------------------------------------------------------- 
    442    if keyword_set(intervalle) AND NOT keyword_set(label) then label=1 
    443    if keyword_set(label) eq 0 then cas=0 else cas=label 
     467   if keyword_set(intervalle) AND NOT keyword_set(label) THEN BEGIN 
     468    label=1 
     469   ENDIF 
     470   if keyword_set(label) eq 0 THEN BEGIN 
     471    cas=0 
     472   ENDIF ELSE BEGIN 
     473    cas=label 
     474   ENDELSE 
    444475   label,cas,min,max,ncontour,level_z2d,NLEVEL=nlevel,INTERVALLE=intervalle, strictfill = strictfill 
    445476;-------------------------------------------------------------- 
    446477; choix de style 
    447478;----------------------------------------------------------- 
    448    if not keyword_set(style) then style=0 
     479   if not keyword_set(style) THEN BEGIN 
     480    style=0 
     481   ENDIF 
    449482   style,style,level_z2d,linestyle,thick 
    450    if keyword_set(inv) then couleur=reverse(couleur) 
     483   if keyword_set(inv) THEN BEGIN 
     484    couleur=reverse(couleur) 
     485   ENDIF 
    451486;---------------------------------------------------------------------- 
    452487   nby = n_elements(yy) 
     
    463498    , coinmontemask=coinmontemask, coindescendmask=coindescendmask, _EXTRA=extra 
    464499;------------------------------------------------------------ 
    465    if n_elements(contour) eq 4 then BEGIN ; c''est la 2eme fois que je passe ds pltt 
     500   if n_elements(contour) eq 4 THEN BEGIN ; c''est la 2eme fois que je passe ds pltt 
    466501      contour = {mietma:[mi, ma], unit:varunit, inter:intervalle} ; je renvoie le min, le max et l''unite 
    467502      return 
    468503   endif 
    469504;------------------------------------------------------------ 
    470    if keyword_set(contour) then BEGIN 
     505   if keyword_set(contour) THEN BEGIN 
    471506      pourlegende = [1, 1, 1, 1] 
    472507      oldattributs = saveatt() 
     
    480515;---------------------------------------------------------------------- 
    481516;---------------------------------------------------------------------- 
    482    if keyword_set(overplot) then GOTO, fini 
     517   if keyword_set(overplot) THEN BEGIN 
     518    GOTO, fini 
     519   ENDIF 
    483520;------------------------------------------------------------ 
    484521; legendes + affichage de celles-ci 
     
    508545;------------------------------------------------------------ 
    509546   terminedessin, _EXTRA=extra 
    510    if keyword_set(oldboite) then domdef, oldboite,GRILLE=[vargrid, 'T'] 
    511 ;------------------------------------------------------------ 
    512    if n_elements(key_performance) NE 0 then $ 
    513     IF key_performance EQ 1 THEN print, 'temps pltt', systime(1)-tempsun 
     547   if keyword_set(oldboite) THEN BEGIN 
     548    domdef, oldboite,GRILLE=[vargrid, 'T'] 
     549   ENDIF 
     550;------------------------------------------------------------ 
     551   if n_elements(key_performance) NE 0 THEN BEGIN 
     552    IF key_performance EQ 1 THEN BEGIN 
     553     print, 'temps pltt', systime(1)-tempsun 
     554    ENDIF 
     555   ENDIF 
    514556end 
  • trunk/procs/saxo_mods/skewness_4d.pro

    r203 r205  
    8989   ntreal = ( (WHERE(FINITE(x) EQ 0 ))[0] NE -1 ) ?  TOTAL(FINITE(x), xndim) : nt 
    9090 
    91    IF ARG_PRESENT(NVAL) THEN nval = ntreal 
     91   IF ARG_PRESENT(NVAL) THEN BEGIN 
     92    nval = ntreal 
     93   ENDIF 
    9294 
    9395; Check length. 
    94    IF (WHERE(ntreal LE 1))[0] NE -1 THEN $ 
     96   IF (WHERE(ntreal LE 1))[0] NE -1 THEN BEGIN 
    9597    MESSAGE, "Matrix of length of time-series must contain 2 or more elements" 
     98   ENDIF 
    9699 
    97100; If the DOUBLE keyword is not set then the internal precision and 
     
    114117   zero = where(std EQ 0) 
    115118 
    116    if zero[0] NE -1 then STOP, $ 
     119   if zero[0] NE -1 THEN BEGIN 
     120    STOP, $ 
    117121    'Cannot compute skewness since there are zeros in the matrix of standard deviations !' 
     122   ENDIF 
    118123 
    119124; Problem with high masked values (x^3 makes NAN when x is high) 
     
    125130; Compute skewness 
    126131   Skew = Skewness_Num(x, nt, Double = useDouble, NAN = nan) / (ntreal*std^3) 
    127    IF idx_std[0] NE -1 THEN Skew[idx_std] = valmask 
     132   IF idx_std[0] NE -1 THEN BEGIN 
     133    Skew[idx_std] = valmask 
     134   ENDIF 
    128135 
    129136   return, useDouble ? Skew : FLOAT(Skew) 
  • trunk/procs/search_time_file.pro

    r203 r205  
    183183   suff_var = '' 
    184184 
    185    IF strpos(cmd.timave, 'mm') NE -1 THEN meanm = 'yes' ELSE meanm = 'no' 
     185   IF strpos(cmd.timave, 'mm') NE -1 THEN BEGIN 
     186    meanm = 'yes' 
     187   ENDIF ELSE BEGIN 
     188    meanm = 'no' 
     189   ENDELSE 
    186190 
    187191   CASE meanm OF 
     
    231235         WHILE il LE nfiles-1 AND found EQ 0 DO BEGIN 
    232236            file = line[il] 
    233             IF debug_w THEN print, '    line = ', line 
     237            IF debug_w THEN BEGIN 
     238             print, '    line = ', line 
     239            ENDIF 
    234240            ; remove root directory if exists 
    235241            IF strpos(file, '/') NE -1 THEN BEGIN 
     
    246252            dat2 = argvar[3] 
    247253 
    248             IF debug_w THEN  print, '    dat1, date1, dat2, date2 ', dat1,' ', date1,' ', dat2,' ', date2 
     254            IF debug_w THEN BEGIN 
     255             print, '    dat1, date1, dat2, date2 ', dat1,' ', date1,' ', dat2,' ', date2 
     256            ENDIF 
    249257 
    250258            IF strpos(dat1, '_') EQ -1 AND strpos(dat2, '_') EQ -1 AND $ 
    251259             strpos(dat1, '-') EQ -1 AND strpos(dat2, '-') EQ -1 THEN BEGIN 
    252                IF (long(dat1) LE long(date1) AND long(dat2) GE long(date2))  THEN BEGIN 
     260               IF (long(dat1) LE long(date1) AND long(dat2) GE long(date2)) THEN BEGIN 
    253261                  found = 1 
    254262                  delta_t2 = compute_time(cmd.timave, dat1, date1) 
     
    290298;   print, date1, date2, delta_t1 
    291299 
    292    IF nfiles EQ 0 OR found EQ 0 THEN BEGIN & date1 = '???' & date2 = '???' & END 
     300   IF nfiles EQ 0 OR found EQ 0 THEN BEGIN 
     301    date1 = '???' 
     302    date2 = '???' 
     303   ENDIF 
    293304 
    294305END 
  • trunk/procs/stat_error.pro

    r203 r205  
    9191 
    9292   niter1 = 999 
    93    IF keyword_set(niter) THEN niter1 = niter 
     93   IF keyword_set(niter) THEN BEGIN 
     94    niter1 = niter 
     95   ENDIF 
    9496 
    9597   errstats = fltarr(niter1) 
  • trunk/procs/tools_wavelets/wavetest.pro

    r203 r205  
    114114                TITLE='a) NINO3 Sea Surface Temperature (seasonal)', $ 
    115115                POSITION=pos1 
    116         IF (N_ELEMENTS(recon_sst) GT 1) THEN OPLOT,time,recon_sst,COLOR=144 
     116        IF (N_ELEMENTS(recon_sst) GT 1) THEN BEGIN 
     117         OPLOT,time,recon_sst,COLOR=144 
     118        ENDIF 
    117119        XYOUTS,0.85,0.9,/NORMAL,ALIGN=0.5, $ 
    118120                '!5WAVELET ANALYSIS!X'+$ 
     
    165167        OPLOT,xrange,scaleavg_signif+[0,0],LINES=1 
    166168 
    167 IF (printfile) THEN DEVICE,/CLOSE 
     169IF (printfile) THEN BEGIN 
     170 DEVICE,/CLOSE 
     171ENDIF 
    168172END 
  • trunk/procs/trends.pro

    r203 r205  
    162162; build indexes to keep in [0,N-1] = serie of [sel1,sel2] mod(freq) 
    163163 
    164    IF (size(fld))[0] EQ 1 AND sample EQ 1 THEN BEGIN ; 1D time serie 
    165      IF NOT keyword_set(silent) THEN print, '     Extract months : ', month1, month2 
     164   IF (size(fld))[0] EQ 1 AND sample EQ 1 THEN BEGIN 
     165     ; 1D time serie 
     166     IF NOT keyword_set(silent) THEN BEGIN 
     167      print, '     Extract months : ', month1, month2 
     168     ENDIF 
    166169      Ndim = (size(fld))[1] 
    167170      idx0 = floor(findgen(sel2-sel1+1)+sel1) 
     
    188191 
    189192   IF c_normal EQ 1 AND (size(fld))[0] EQ 1 THEN BEGIN 
    190       IF NOT keyword_set(silent) THEN print, '     Normalizing 1D time series with stddev = ',sqrt((moment(fld))[1]) 
     193      IF NOT keyword_set(silent) THEN BEGIN 
     194       print, '     Normalizing 1D time series with stddev = ',sqrt((moment(fld))[1]) 
     195      ENDIF 
    191196      fld = fld/sqrt((moment(fld))[1]) 
    192197   ENDIF 
     
    198203      '1': BEGIN  ; trend = remove first value 
    199204;                   --------------------------- 
    200          IF (size(fld))[0] EQ 1 THEN BEGIN ; 1D time serie 
     205         IF (size(fld))[0] EQ 1 THEN BEGIN 
     206            ; 1D time serie 
    201207            fld = fld-fld[0] 
    202          ENDIF ELSE BEGIN                  ; hovmoeller 
     208         ENDIF ELSE BEGIN 
     209            ; hovmoeller 
    203210            fldrem = fld[*, 0]#replicate(1, (size(fld))[2]) 
    204211            fld = fld-fldrem 
     
    207214      '2': BEGIN  ; drift = remove previous value 
    208215;                   ------------------------------ 
    209          IF (size(fld))[0] EQ 1 THEN BEGIN ; 1D time serie 
     216         IF (size(fld))[0] EQ 1 THEN BEGIN 
     217            ; 1D time serie 
    210218            fldrem = shift(fld, 1) 
    211219            fldrem[0]= fld[0] 
     
    219227      '3': BEGIN  ; inverse trend = remove mean of <n> last values 
    220228;                   ---------------------------------------------- 
    221          IF strlen(trend_type) GT 1 THEN $ 
    222           mean_n = long(strmid(trend_type, 1, strlen(trend_type)-1)) ELSE mean_n = 1 
    223          IF (size(fld))[0] EQ 1 THEN BEGIN ; 1D time serie 
     229         IF strlen(trend_type) GT 1 THEN BEGIN 
     230          mean_n = long(strmid(trend_type, 1, strlen(trend_type)-1)) 
     231         ENDIF ELSE BEGIN 
     232          mean_n = 1 
     233         ENDELSE 
     234         IF (size(fld))[0] EQ 1 THEN BEGIN 
     235            ; 1D time serie 
    224236            fld = mean(fld[(size(fld))[1]-mean_n:(size(fld))[1]-1])-fld 
    225237         ENDIF ELSE BEGIN                  ; hovmoeller 
     
    228240            idx = where(fld EQ valmask) 
    229241            fld = fldrem-fld 
    230             IF idx[0] NE -1 THEN fld[idx] = valmask 
     242            IF idx[0] NE -1 THEN BEGIN 
     243             fld[idx] = valmask 
     244            ENDIF 
    231245         ENDELSE 
    232246      END 
    233247      '4': BEGIN  ; anomaly = remove average running mean 
    234248;                   ------------------------------------- 
    235          IF strlen(trend_type) GT 1 THEN $ 
    236           running = long(strmid(trend_type, 1, strlen(trend_type)-1)) ELSE running = 1 
     249         IF strlen(trend_type) GT 1 THEN BEGIN 
     250          running = long(strmid(trend_type, 1, strlen(trend_type)-1)) 
     251         ENDIF ELSE BEGIN 
     252          running = 1 
     253         ENDELSE 
    237254 
    238255         ; check that jpt is a multiple of running 
    239          IF NOT keyword_set(silent) THEN print, '      jpt MOD running = ', jpt, running, jpt MOD running 
     256         IF NOT keyword_set(silent) THEN BEGIN 
     257          print, '      jpt MOD running = ', jpt, running, jpt MOD running 
     258         ENDIF 
    240259 
    241260         IF (jpt MOD running) NE 0 THEN BEGIN 
     
    244263         ENDIF 
    245264 
    246          IF (size(fld))[0] EQ 1 THEN BEGIN ; 1D time serie 
     265         IF (size(fld))[0] EQ 1 THEN BEGIN 
     266            ; 1D time serie 
    247267            ; build array to remove from time serie 
    248268            IF running GE 2 THEN BEGIN 
     
    255275                  fldrem_t1 = fldrem 
    256276               ENDIF 
    257                IF fld_flag EQ 2 THEN fldrem_t2 = fldrem 
     277               IF fld_flag EQ 2 THEN BEGIN 
     278                fldrem_t2 = fldrem 
     279               ENDIF 
    258280               sc_ampl = sqrt((moment(fldrem))[1]) 
    259281               sc_ampl2 = max(fldrem)-min(fldrem) 
     
    283305               ENDIF  ELSE err_std_3 = 0 
    284306 
    285                IF NOT keyword_set(silent) THEN print, '     1D times-serie anomaly info : var/stddev +- error (24,36,48)', (moment(fld - fldrem))[1], sqrt((moment(fld - fldrem))[1]), err_std_1, err_std_2, err_std_3 
     307               IF NOT keyword_set(silent) THEN BEGIN 
     308                print, '     1D times-serie anomaly info : var/stddev +- error (24,36,48)', (moment(fld - fldrem))[1], sqrt((moment(fld - fldrem))[1]), err_std_1, err_std_2, err_std_3 
     309               ENDIF 
    286310               stddev_txt = strtrim(string(sqrt((moment(fld - fldrem))[1])), 2) 
    287                IF NOT keyword_set(silent) THEN print, ' ' 
     311               IF NOT keyword_set(silent) THEN BEGIN 
     312                print, ' ' 
     313               ENDIF 
    288314            ENDIF ELSE fldrem = mean(fld) 
    289315 
     
    332358         ENDIF ELSE BEGIN                  ; hovmoeller 
    333359            ; build array to remove from time serie 
    334             IF NOT keyword_set(silent)  THEN print, '  anomaly = remove average running mean (hovmoeller)' 
     360            IF NOT keyword_set(silent) THEN BEGIN 
     361             print, '  anomaly = remove average running mean (hovmoeller)' 
     362            ENDIF 
    335363            CASE type OF 
    336364               'xt': BEGIN 
     
    378406             ; keep mean seasonal cycle in common 
    379407             mean_sc = fldrem 
    380              IF idx[0] NE -1 THEN fld[idx] = valmask 
     408             IF idx[0] NE -1 THEN BEGIN 
     409              fld[idx] = valmask 
     410             ENDIF 
    381411         ENDELSE 
    382412 
     
    409439 
    410440; compute field time integral if required 
    411    IF n_elements(field_int) EQ 0 THEN field_int = 0 
     441   IF n_elements(field_int) EQ 0 THEN BEGIN 
     442    field_int = 0 
     443   ENDIF 
    412444   IF field_intl EQ 1 THEN BEGIN 
    413445      ; running integral ? 
    414       IF strlen(trend_type) GT 1 THEN $ 
    415        int_win = long(strmid(trend_type, 1, strlen(trend_type)-1)) ELSE int_win = 0 
     446      IF strlen(trend_type) GT 1 THEN BEGIN 
     447       int_win = long(strmid(trend_type, 1, strlen(trend_type)-1)) 
     448      ENDIF ELSE BEGIN 
     449       int_win = 0 
     450      ENDELSE 
    416451      CASE (size(fld))[0] OF 
    417452         1: BEGIN 
     
    419454            fldint = fld 
    420455            lenght = (size(fld))[1] 
    421             IF int_win EQ 0 THEN BEGIN  ; integral from start 
     456            IF int_win EQ 0 THEN BEGIN 
     457               ; integral from start 
    422458               FOR t = 0, lenght-1 DO BEGIN 
    423459                  fldint[t] = total(fld[0:t]) 
     
    463499                     zwrk = fld[i, *] 
    464500                     zint = zwrk 
    465                      IF int_win EQ 0 THEN BEGIN ; integral from start 
     501                     IF int_win EQ 0 THEN BEGIN 
     502                        ; integral from start 
    466503                        FOR t = 0, lenght-1 DO BEGIN 
    467504                           zint[t] = total(zwrk[0:t]) 
     
    488525; if write_data then write to ascii/cdf file 
    489526 
    490    IF n_elements(write_data) EQ 0 THEN write_data = 0 
     527   IF n_elements(write_data) EQ 0 THEN BEGIN 
     528    write_data = 0 
     529   ENDIF 
    491530   IF write_data NE 0 THEN BEGIN 
    492       IF write_data GE 1 THEN BEGIN ; ascii 
     531      IF write_data GE 1 THEN BEGIN 
     532         ; ascii 
    493533         scale = 1. 
    494534         get_lun, nuldat 
    495          IF field.origin EQ 'div' THEN $ 
    496           name_exp = strjoin(strsplit(cmd_wrk.exp, '/', /EXTRACT), '-', /SINGLE) ELSE name_exp = cmd_wrk.exp 
     535         IF field.origin EQ 'div' THEN BEGIN 
     536          name_exp = strjoin(strsplit(cmd_wrk.exp, '/', /EXTRACT), '-', /SINGLE) 
     537         ENDIF ELSE BEGIN 
     538          name_exp = cmd_wrk.exp 
     539         ENDELSE 
    497540         filename = name_exp+'_'+ cmd_wrk.var+'_'+cmd_wrk.date1+'_'+cmd_wrk.spec+'_'+cmd_wrk.plt+'.asc' 
    498541         openw, nuldat, asciidir+filename 
     
    522565 
    523566END 
    524  
  • trunk/procs/tvnplot.pro

    r203 r205  
    7272 ENDIF 
    7373; 
    74    IF keyword_set(min)     EQ 0 THEN min = min(image) 
    75    IF keyword_set(max)     EQ 0 THEN max = max(image) 
    76    IF keyword_set(scale_x) EQ 0 THEN scale_x = 1. 
    77    IF keyword_set(scale_y) EQ 0 THEN scale_y = 1. 
    78    IF keyword_set(ibase)   EQ 0 THEN ibase = 0. 
    79    IF keyword_set(jbase)   EQ 0 THEN jbase = 0. 
     74   IF keyword_set(min)     EQ 0 THEN BEGIN 
     75    min = min(image) 
     76   ENDIF 
     77   IF keyword_set(max)     EQ 0 THEN BEGIN 
     78    max = max(image) 
     79   ENDIF 
     80   IF keyword_set(scale_x) EQ 0 THEN BEGIN 
     81    scale_x = 1. 
     82   ENDIF 
     83   IF keyword_set(scale_y) EQ 0 THEN BEGIN 
     84    scale_y = 1. 
     85   ENDIF 
     86   IF keyword_set(ibase)   EQ 0 THEN BEGIN 
     87    ibase = 0. 
     88   ENDIF 
     89   IF keyword_set(jbase)   EQ 0 THEN BEGIN 
     90    jbase = 0. 
     91   ENDIF 
    8092   sample = 0 
    81    IF keyword_set(interp)  EQ 0 THEN sample = 1 
    82  
     93   IF keyword_set(interp)  EQ 0 THEN BEGIN 
     94    sample = 1 
     95   ENDIF 
    8396 
    8497   x_env_save = !x 
     
    99112   nj = (size(image))[2] 
    100113 
    101    IF keyword_set(gamma)   EQ 0 THEN BEGIN 
     114   IF keyword_set(gamma) EQ 0 THEN BEGIN 
    102115      gamma = 600/max([ni, nj]) 
    103116   ENDIF 
     
    115128      xsize = ni*gamma+200 
    116129      ysize = nj*gamma+200 
    117       IF (!d.x_size LT xsize) OR (!d.y_size LT ysize) THEN $ 
     130      IF (!d.x_size LT xsize) OR (!d.y_size LT ysize) THEN BEGIN 
    118131       window, xsize = ni*gamma+200, ysize = nj*gamma+200 
     132      ENDIF 
    119133 
    120134      xcmperpix = 1. 
     
    145159      subtitle = 'MIN='+string(min)+' / MAX='+string(max) 
    146160 
    147       IF keyword_set(erase) NE 0 THEN erase, 255 
     161      IF keyword_set(erase) NE 0 THEN BEGIN 
     162       erase, 255 
     163      ENDIF 
    148164 
    149165      tv, image2, x0, y0, xsize = xsize, ysize = ysize, _EXTRA=extra 
     
    184200                  i1=0 > floor(ni*(x-x0)/dx) < (ni-1) 
    185201                  j1=0 > floor(nj*(y-y0)/dy) < (nj-1) 
    186                   IF i1 LE i0 THEN i1 = (i0+10) < (ni-1) 
    187                   IF j1 LE j0 THEN j1 = (j0+10) < (nj-1) 
     202                  IF i1 LE i0 THEN BEGIN 
     203                   i1 = (i0+10) < (ni-1) 
     204                  ENDIF 
     205                  IF j1 LE j0 THEN BEGIN 
     206                   j1 = (j0+10) < (nj-1) 
     207                  ENDIF 
    188208                  tvnplot, image[i0:i1, j0:j1], _EXTRA=extra, /erase, $ 
    189209                   ibase = i0+ibase, jbase = j0+jbase, MIN = min, Max = max 
  • trunk/procs/two_var_read.pro

    r203 r205  
    1919               ; read second variable 
    2020 
    21                IF debug_w THEN print, 'Reading second variable in data_read/two_var_read' 
     21               IF debug_w THEN BEGIN 
     22                print, 'Reading second variable in data_read/two_var_read' 
     23               ENDIF 
    2224 
    2325               IF strpos(cmd.var, '(next)') EQ -1 THEN BEGIN  ; type 1 y=f(x) on 1 line 
     
    3941 
    4042  ;Exception if large_domain = 1 
    41                   IF debug_w THEN print, 'type 2 y=f(next) or y=bin(x) on 2 lines' 
     43                  IF debug_w THEN BEGIN 
     44                   print, 'type 2 y=f(next) or y=bin(x) on 2 lines' 
     45                  ENDIF 
    4246                  IF large_domain EQ 1 AND plttyp EQ 'ybinx' THEN BEGIN 
    4347                     use_large_domain = 1 
     
    6367                     sw_diffg = 1 
    6468                     jptb = jpt 
    65                      IF debug_w THEN print, '    (in data_read) cmd2.grid <> cmd.grid ', cmd2.grid, cmd.grid 
    66                      IF debug_w THEN print, '    exec def_grid, cmd2_back in data_read : ' 
     69                     IF debug_w THEN BEGIN 
     70                      print, '    (in data_read) cmd2.grid <> cmd.grid ', cmd2.grid, cmd.grid 
     71                      print, '    exec def_grid, cmd2_back in data_read : ' 
     72                     ENDIF 
    6773                     grid2_full = cmd2_back.grid 
    6874                     def_grid, cmd2_back 
     
    7480                  print, '   Variable 2 ', var2, ' read on vargrid ', vargrid 
    7581                  jptb = jpt 
    76                   if debug_w THEN print, '   yfx grids different ? / sw_diffg = ', sw_diffg 
     82                  if debug_w THEN BEGIN 
     83                   print, '   yfx grids different ? / sw_diffg = ', sw_diffg 
     84                  ENDIF 
     85 
    7786                  IF sw_diffg EQ 1 THEN BEGIN 
    78                      IF debug_w THEN print, '   exec def_grid, cmd1_back in data_read : ' 
     87                     IF debug_w THEN BEGIN 
     88                      print, '   exec def_grid, cmd1_back in data_read : ' 
     89                     ENDIF 
    7990                     grid1_full = cmd1_back.grid 
    8091                     def_grid, cmd1_back 
  • trunk/procs/update_data.pro

    r203 r205  
    117117               ;old_boite = [lon1, lon2, lat1, lat2, prof1, prof2] 
    118118               print, '      Average in vertical domain ', vert_type, vert_mean 
    119                ;IF vert_mean[0] EQ vert_mean[1] THEN stop, report('vert_mean[0] cannot be equal to vert_mean[1]') 
     119               ;IF vert_mean[0] EQ vert_mean[1] THEN BEGIN 
     120               ; stop, report('vert_mean[0] cannot be equal to vert_mean[1]') 
     121               ; ENDIF 
    120122               CASE vert_type OF 
    121123                  'z': BEGIN 
     
    139141      ;; fichier 4d : volume + temps 
    140142      4: BEGIN 
    141          IF debug_w THEN print, ' jpt = ', jpt 
     143         IF debug_w THEN BEGIN 
     144          print, ' jpt = ', jpt 
     145         ENDIF 
    142146         IF jpt GT 1 THEN BEGIN 
    143147            print, '    Found ', vname, ' (3D data time serie)', strcompress(string(time_1)),'-', strtrim(string(time_2), 2), '   from file' 
  • trunk/procs/ybinx.pro

    r203 r205  
    2828               bin_plt = [2*bin_plt[0]-bin_plt[1], bin_plt[0:nbins-2], 2*bin_plt[nbins-2]-bin_plt[nbins-3]] 
    2929 
    30                IF debug_w THEN print, '    bin_plt= ', bin_plt 
    31                IF debug_w THEN print, '      nbins= ', nbins 
     30               IF debug_w THEN BEGIN 
     31                print, '    bin_plt= ', bin_plt 
     32                print, '      nbins= ', nbins 
     33               ENDIF 
    3234 
    3335               ; 3rd field to bin regression ? 
    3436 
    35                IF var3_ybinx NE "" THEN sw3 = 1 ELSE sw3 = 0 
     37               IF var3_ybinx NE "" THEN BEGIN 
     38                sw3 = 1 
     39               ENDIF ELSE BEGIN 
     40                sw3 = 0 
     41               ENDELSE 
    3642 
    3743               ; mask fields with valmask for regression computation 
     
    3945               IF sw3 THEN BEGIN 
    4046                  idxmsk = where(fld GT valmask/10.) 
    41                   IF idxmsk[0] NE -1 THEN fld[idxmsk] = valmask 
    42                   IF idxmsk[0] NE -1 THEN fld3[idxmsk] = valmask 
     47                  IF idxmsk[0] NE -1 THEN BEGIN 
     48                   fld[idxmsk] = valmask 
     49                  ENDIF 
     50                  IF idxmsk[0] NE -1 THEN BEGIN 
     51                   fld3[idxmsk] = valmask 
     52                  ENDIF 
    4353               ENDIF 
    4454 
     
    4757               idxmskpn = where(finite(fld, /nan)) 
    4858               idxmskpn2 = where(finite(fld2, /nan)) 
    49                IF idxmskpn[0] NE -1 THEN fld[idxmskpn] = valmask 
    50                IF idxmskpn2[0] NE -1 THEN fld2[idxmskpn2] = valmask 
     59               IF idxmskpn[0] NE -1 THEN BEGIN 
     60                fld[idxmskpn] = valmask 
     61               ENDIF 
     62               IF idxmskpn2[0] NE -1 THEN BEGIN 
     63                fld2[idxmskpn2] = valmask 
     64               ENDIF 
    5165 
    5266               idxmskpn = where(fld GT valmask/10.) 
    5367               idxmskpn2 = where(fld2 GT valmask/10.) 
    54                IF idxmskpn[0] NE -1 THEN fld2[idxmskpn] = valmask 
    55                IF idxmskpn2[0] NE -1 THEN fld[idxmskpn2] = valmask 
     68               IF idxmskpn[0] NE -1 THEN BEGIN 
     69                fld2[idxmskpn] = valmask 
     70               ENDIF 
     71               IF idxmskpn2[0] NE -1 THEN BEGIN 
     72                fld[idxmskpn2] = valmask 
     73               ENDIF 
    5674 
    5775               ; print min/max of field for debug 
    5876               idxmskp = where(fld LE valmask/10.) 
    59                IF debug_w THEN print, '    Min/max fld= ', min(fld[idxmskp]), max(fld[idxmskp]) 
    60                IF debug_w THEN print, '    Min/max fld2= ', min(fld2[idxmskp]), max(fld2[idxmskp]) 
     77               IF debug_w THEN BEGIN 
     78                print, '    Min/max fld= ', min(fld[idxmskp]), max(fld[idxmskp]) 
     79                print, '    Min/max fld2= ', min(fld2[idxmskp]), max(fld2[idxmskp]) 
     80               ENDIF 
    6181 
    6282               ; remove mean seasonal cycle if required 
     
    6484               IF cmd.trend GT 0 THEN BEGIN 
    6585                  fld = trends(fld, cmd.trend, 'xyt') 
    66                   IF sw3 THEN fld3 = trends(fld3, cmd.trend, 'xyt') 
     86                  IF sw3 THEN BEGIN 
     87                   fld3 = trends(fld3, cmd.trend, 'xyt') 
     88                  ENDIF 
    6789               ENDIF 
    6890               IF cmd2.trend GT 0 THEN BEGIN 
     
    82104                  fldn = (fld)[*, *, reform(idxm[0,*], njpt)] 
    83105                  fld2n = (fld2)[*, *, reform(idxm[0,*], njpt)] 
    84                   IF sw3 THEN fld3n = (fld3)[*, *, reform(idxm[0,*], njpt)] 
     106                  IF sw3 THEN BEGIN 
     107                   fld3n = (fld3)[*, *, reform(idxm[0,*], njpt)] 
     108                  ENDIF 
    85109 
    86110                  FOR imth = 1, nmth-1 DO BEGIN 
     
    88112                  fldn = [fldn, (fld)[*, *, reform(idxm[imth,*], njpt)]] 
    89113                  fld2n = [fld2n, (fld2)[*, *, reform(idxm[imth,*], njpt)]] 
    90                   IF sw3 THEN fld3n = [fld3n, (fld3)[*, *, reform(idxm[imth,*], njpt)]] 
     114                  IF sw3 THEN BEGIN 
     115                   fld3n = [fld3n, (fld3)[*, *, reform(idxm[imth,*], njpt)]] 
     116                  ENDIF 
    91117 
    92118                  ENDFOR 
     
    95121                  fld = fldn 
    96122                  fld2 = fld2n 
    97                   IF sw3 THEN fld3 = fld3n 
     123                  IF sw3 THEN BEGIN 
     124                   fld3 = fld3n 
     125                  ENDIF 
    98126               ENDIF 
    99127 
     
    116144                  binpop[ib] = n_elements(indices) 
    117145                  idxb[ib, 0:binpop[ib]-1] = where(fld2 GT bin_interval[ib-1] AND fld2 LE bin_interval[ib]) 
    118                   IF debug_w THEN print, '    Size of bin[i] ', ib, binpop[ib] 
     146                  IF debug_w THEN BEGIN 
     147                   print, '    Size of bin[i] ', ib, binpop[ib] 
     148                  ENDIF 
    119149 
    120150                  ib = ib + 1 
     
    133163               max_idx = max(binpop) 
    134164 
    135                IF debug_w THEN print, '    Max bin size ', max_idx 
    136                IF debug_w THEN print, '    Number of bins ', nbins 
     165               IF debug_w THEN BEGIN 
     166                print, '    Max bin size ', max_idx 
     167                print, '    Number of bins ', nbins 
     168               ENDIF 
    137169               fldy = fltarr(nbins+1, max_idx) 
    138170               fldy[*, *] = !values.f_nan 
     
    159191               WHILE ib LE nbins DO BEGIN 
    160192 
    161                   IF debug_w THEN print, 'bin = ', ib 
     193                  IF debug_w THEN BEGIN 
     194                   print, 'bin = ', ib 
     195                  ENDIF 
    162196                  binsz = binpop[ib] 
    163197                  IF binsz GT 1 THEN BEGIN 
    164198                     fldy[ib, 0:binsz-1] = fld[idxb[ib, 0:binsz-1]] 
    165                      IF debug_w THEN print, 'fld[idxb[ib, 0:binsz-1]] =',fld[idxb[ib, 0:binsz-1]] 
     199                     IF debug_w THEN BEGIN 
     200                      print, 'fld[idxb[ib, 0:binsz-1]] =',fld[idxb[ib, 0:binsz-1]] 
     201                     ENDIF 
    166202                     fldys[ib, 0:binsz-1] = flds[idxb[ib, 0:binsz-1]] 
    167203                     surfb[ib, 0:binsz-1] = surf[idxb[ib, 0:binsz-1]] 
    168                      IF sw3 THEN fldy2[ib, 0:binsz-1] = fld3[idxb[ib, 0:binsz-1]] 
     204                     IF sw3 THEN BEGIN 
     205                      fldy2[ib, 0:binsz-1] = fld3[idxb[ib, 0:binsz-1]] 
     206                     ENDIF 
    169207                  ENDIF 
    170208                  ib = ib + 1 
     
    196234 
    197235                        ; print bin info 
    198                         IF ib GT 0 AND ib LT nbins THEN print, '    Bin size, occurence, average: ', bin_interval[ib-1], bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100., yplt[ib] 
    199                         IF ib EQ 0 THEN print, '    Bin size, occurence, average:      min' , bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
    200                         IF ib EQ nbins THEN print, '    Bin size, occurence, average: ', bin_interval[ib-1],'     max ', binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
    201                      ENDIF ELSE yplt[ib] = !values.f_nan 
     236                        IF ib GT 0 AND ib LT nbins THEN BEGIN 
     237                         print, '    Bin size, occurence, average: ', bin_interval[ib-1], bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100., yplt[ib] 
     238                        ENDIF 
     239                        IF ib EQ 0 THEN BEGIN 
     240                         print, '    Bin size, occurence, average:      min' , bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
     241                        ENDIF 
     242                        IF ib EQ nbins THEN BEGIN 
     243                         print, '    Bin size, occurence, average: ', bin_interval[ib-1],'     max ', binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
     244                        ENDIF 
     245                     ENDIF ELSE BEGIN 
     246                      yplt[ib] = !values.f_nan 
     247                     ENDELSE 
    202248 
    203249                     ib = ib + 1 
     
    237283 
    238284                        ; print bin info 
    239                         IF ib GT 0 AND ib LT nbins THEN print, '    Bin size, occurence, regress.: ', bin_interval[ib-1], bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100., yplt[ib] 
    240                         IF ib EQ 0 THEN print, '    Bin size, occurence, regress.:      min' , bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
    241                         IF ib EQ nbins THEN print, '    Bin size, occurence, regress.: ', bin_interval[ib-1],'     max ', binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
    242  
    243                      ENDIF ELSE yplt[ib] = !values.f_nan 
     285                        IF ib GT 0 AND ib LT nbins THEN BEGIN 
     286                         print, '    Bin size, occurence, regress.: ', bin_interval[ib-1], bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100., yplt[ib] 
     287                        ENDIF 
     288                        IF ib EQ 0 THEN BEGIN 
     289                         print, '    Bin size, occurence, regress.:      min' , bin_interval[ib], binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
     290                        ENDIF 
     291                        IF ib EQ nbins THEN BEGIN 
     292                         print, '    Bin size, occurence, regress.: ', bin_interval[ib-1],'     max ', binpop[ib], (binpop[ib]/total(binpop))*100. , yplt[ib] 
     293                        ENDIF 
     294 
     295                     ENDIF ELSE BEGIN 
     296                      yplt[ib] = !values.f_nan 
     297                     ENDELSE 
    244298 
    245299                     ib = ib + 1 
     
    269323 
    270324               printf, nulhis, strcompress(pltcmd) 
    271                IF debug_w THEN print, '   ', pltcmd 
     325               IF debug_w THEN BEGIN 
     326                print, '   ', pltcmd 
     327               ENDIF 
    272328               res = execute(pltcmd) 
    273329 
     
    279335               res = execute(pltcmd) 
    280336 
    281                IF debug_w THEN print, "    ... Exit ybinx" 
     337               IF debug_w THEN BEGIN 
     338                print, "    ... Exit ybinx" 
     339               ENDIF 
  • trunk/procs/yfx.pro

    r203 r205  
    3030                  boxx = ' ['+boxx+']' 
    3131                  vargrid = vargrid1 
    32                   IF debug_w THEN print, '   yfx: domdef and vargrid : ', boite_plt1d[0:3], vargrid 
     32                  IF debug_w THEN BEGIN 
     33                   print, '   yfx: domdef and vargrid : ', boite_plt1d[0:3], vargrid 
     34                  ENDIF 
    3335                  domdef, boite_plt1d[0:3] 
    3436                  print, '   Averaging (time serie plot) cmd.var '+cmd.var+' in'+boxx 
    35                   IF debug_w THEN print, '    fld size', size(fld) 
     37                  IF debug_w THEN BEGIN 
     38                   print, '    fld size', size(fld) 
     39                  ENDIF 
    3640                  fld = checkfield(fld, 'plt1d', type = datyp.hotyp, boite = boite_plt1d) 
    3741                  IF cmd.trend GT 0 THEN BEGIN 
     
    4246               ENDIF 
    4347              ; space and time plots fld2 
    44                IF debug_w THEN print, '   cmd1_back = ', cmd1_back 
    45                IF debug_w THEN print, '   cmd2_back = ', cmd2_back 
    46                IF debug_w AND sw_diffg THEN print, '   grid1_full = ', grid1_full 
    47                IF debug_w AND sw_diffg THEN print, '   grid2_full = ', grid2_full 
     48               IF debug_w THEN BEGIN 
     49                print, '   cmd1_back = ', cmd1_back 
     50                print, '   cmd2_back = ', cmd2_back 
     51                IF sw_diffg THEN BEGIN 
     52                 print, '   grid1_full = ', grid1_full 
     53                 print, '   grid2_full = ', grid2_full 
     54                ENDIF 
     55               ENDIF 
    4856               IF sw_diffg EQ 1 THEN BEGIN 
    4957                  jptb = jpt 
    50                   IF debug_w THEN print, '  calling def_grid, cmd2_back in plt_map/yfx ' 
     58                  IF debug_w THEN BEGIN 
     59                   print, '  calling def_grid, cmd2_back in plt_map/yfx ' 
     60                  ENDIF 
    5161                  cmd2_back.grid = grid2_full 
    5262                  def_grid, cmd2_back 
     
    7282                  boxy = ' ['+boxy+']' 
    7383                  vargrid = vargrid2 
    74                   IF debug_w THEN print, '    domdef and vargrid : ', boite_plt1d2[0:3], vargrid 
     84                  IF debug_w THEN BEGIN 
     85                   print, '    domdef and vargrid : ', boite_plt1d2[0:3], vargrid 
     86                  ENDIF 
    7587                  domdef, boite_plt1d2[0:3] 
    7688                  print, '   Averaging  (time serie plot) cmd2.var '+cmd2.var+' in'+boxy 
    77                   IF debug_w THEN print, '    fld2 size', size(fld2) 
     89                  IF debug_w THEN BEGIN 
     90                   print, '    fld2 size', size(fld2) 
     91                  ENDIF 
    7892                  fld2 = checkfield(fld2, 'plt1d', type = datyp2.hotyp, direc = 'xy', boite = boite_plt1d2, /timearray) 
    7993                  IF cmd2.trend GT 0 THEN BEGIN 
     
    86100                  sw_diffg = 0 
    87101                  jptb = jpt 
    88                   IF debug_w THEN print, ' calling def_grid, cmd1_back in plt_map/yfx ' 
     102                  IF debug_w THEN BEGIN 
     103                   print, ' calling def_grid, cmd1_back in plt_map/yfx ' 
     104                  ENDIF 
    89105                  cmd1_back.grid = grid1_full 
    90106                  def_grid, cmd1_back 
     
    103119               ; text for plot info in legend_overlay 
    104120               coeff_txt = 'Linfit = '+strtrim(string(coeff[1], format = fmt_linfit), 2) 
    105                IF proberr NE 1.0 THEN print, '    WARNING: proba = ',proberr 
     121               IF proberr NE 1.0 THEN BEGIN 
     122                print, '    WARNING: proba = ',proberr 
     123               ENDIF 
    106124               ; divide serie in two domains (on x axis) seperated by linfit_sep (plt_def) 
    107125               ; do only if 1m@t412 (if full serie, then separate by season) 
    108126 
    109                IF linfit_sep NE -99999 AND cmd.trend EQ 412 THEN begin 
     127               IF linfit_sep NE -99999 AND cmd.trend EQ 412 THEN BEGIN 
    110128 
    111129                  idx_low = where (fld2 LE linfit_sep) 
     
    116134                     coeffl = linfit(fld2[idx_low], fld[idx_low], CHISQ = linerrl, PROB = proberrl, SIGMA = sigmaerrl) 
    117135                     print, '    Linfit coef below ',strtrim(string(linfit_sep), 2),' = ', coeffl[0], coeffl[1], ' errbar = ',sigmaerrl 
    118                      IF proberrl NE 1.0 THEN print, '    *** WARNING: proba lower = ',proberrl 
     136                     IF proberrl NE 1.0 THEN BEGIN 
     137                      print, '    *** WARNING: proba lower = ',proberrl 
     138                     ENDIF 
    119139                     coefflu_txt = coefflu_txt+strtrim(string(coeffl[1], format = fmt_linfit), 2)+'<'+strtrim(string(linfit_sep, format = '(F4.2)'), 2) 
    120140                  ENDIF 
     
    123143                     coeffu = linfit(fld2[idx_up], fld[idx_up], CHISQ = linerru, PROB = proberru, SIGMA = sigmaerru) 
    124144                     print, '    Linfit coef above ',strtrim(string(linfit_sep), 2),' = ', coeffu[0], coeffu[1], ' errbar = ',sigmaerru 
    125                      IF proberru NE 1.0 THEN print, '    *** WARNING: proba upper = ',proberru 
     145                     IF proberru NE 1.0 THEN BEGIN 
     146                      print, '    *** WARNING: proba upper = ',proberru 
     147                     ENDIF 
    126148                  coefflu_txt = coefflu_txt+'>'+strtrim(string(coeffu[1], format = fmt_linfit), 2) 
    127149                  ENDIF 
     
    194216                              pltcmd = 'pltsc,fldp,fldp2,minc,maxc,minc2,maxc2,varlegend2, boite=boxyfx'+com_strplt+',ov1d='+string[ic]+',COLOR='+string(symbol_color[ic])+', STY1D='+string(symbol_style[ic]-1)+', SYMSIZE='+string(symbol_size) 
    195217                              printf, nulhis, strcompress(pltcmd) 
    196                               IF debug_w THEN print, '   ',pltcmd 
     218                              IF debug_w THEN BEGIN 
     219                               print, '   ',pltcmd 
     220                              ENDIF 
    197221                              res = execute(pltcmd) 
    198222                           ENDIF 
     
    211235 
    212236                              printf, nulhis, strcompress(pltcmd) 
    213                               IF debug_w THEN print, '   ', pltcmd 
     237                              IF debug_w THEN BEGIN 
     238                               print, '   ', pltcmd 
     239                              ENDIF 
    214240                              res = execute(pltcmd) 
    215241                              pltcmd = 'pltt,(lincoef-linerro)*'+string(mult_coeff)+', '''+hotyp+''''+minmax+com_strplt+',ov1d=1,COLOR=1, thick=1, STY1D=0' 
    216242                              printf, nulhis, strcompress(pltcmd) 
    217                               IF debug_w THEN print, '   ',pltcmd 
     243                              IF debug_w THEN BEGIN 
     244                               print, '   ', pltcmd 
     245                              ENDIF 
    218246                              res = execute(pltcmd) 
    219247                              pltcmd = 'pltt,(lincoef+linerro)*'+string(mult_coeff)+', '''+hotyp+''''+minmax+com_strplt+',ov1d=1,COLOR=1, thick=1, STY1D=0' 
    220248                              printf, nulhis, strcompress(pltcmd) 
    221                               IF debug_w THEN print, '   ',pltcmd 
     249                              IF debug_w THEN BEGIN 
     250                               print, '   ',pltcmd 
     251                              ENDIF 
    222252                              res = execute(pltcmd) 
    223253                              pltcmd = 'pltt,linerr0, '''+hotyp+''''+minmax+com_strplt+',ov1d=1,COLOR=2, thick=1, STY1D=0' 
    224254                              printf, nulhis, strcompress(pltcmd) 
    225                               IF debug_w THEN print, '   ',pltcmd 
     255                              IF debug_w THEN BEGIN 
     256                               print, '   ', pltcmd 
     257                              ENDIF 
    226258                              res = execute(pltcmd) 
    227259                           ENDIF 
     
    230262                        coeffm_txt = coeffm_txt+']' 
    231263                     ENDIF ELSE BEGIN ; one color 
    232                         IF debug_w THEN print, '   ',pltcmdstd 
     264                        IF debug_w THEN BEGIN 
     265                         print, '   ',pltcmdstd 
     266                        ENDIF 
    233267                        res = execute(pltcmdstd[0]) 
    234268                     ENDELSE 
    235269                  ENDIF 
    236270               ENDIF ELSE BEGIN ; standard scatter plot 
    237                   IF debug_w THEN print, '   ',pltcmdstd 
     271                  IF debug_w THEN BEGIN 
     272                   print, '   ',pltcmdstd 
     273                  ENDIF 
    238274                  res = execute(pltcmdstd[0]) 
    239275               ENDELSE 
    240                IF cmd.trend EQ 412 THEN coeffm_txt = '' 
     276               IF cmd.trend EQ 412 THEN BEGIN 
     277                coeffm_txt = '' 
     278               ENDIF 
    241279               ; Add slope value 
    242280               @legend_overlay 
     
    276314                     pltcmd = 'pltsc,stdsc,stdsc2,0. ,maxc,0.,maxc2,varlegend2, boite=boxyfx'+com_strplt+',ov1d=1-min(1,sw_ov1d), STY1D=-1, THICKN=3, SYMSIZE='+string(symbol_size)+', FRACTION=fraction' 
    277315                     printf, nulhis, strcompress(pltcmd) 
    278                      IF debug_w THEN print, pltcmd 
     316                     IF debug_w THEN BEGIN 
     317                      print, pltcmd 
     318                     ENDIF 
    279319                     res = execute(pltcmd[0]) 
    280320                     pltcmd = 'xyouts,stdsc2-(maxc2)/(.3*win[0]*win[1]),stdsc,string(long(findgen(12))+1),charsize=1.3,alignment=0.5' 
    281321                     printf, nulhis, strcompress(pltcmd) 
    282                      IF debug_w THEN print, pltcmd 
     322                     IF debug_w THEN BEGIN 
     323                      print, pltcmd 
     324                     ENDIF 
    283325                     res = execute(pltcmd[0]) 
    284326                  ENDIF ELSE BEGIN 
    285327                     ov1d_val = 0 
    286                      IF mean_sc_only EQ 1 THEN ov1d_val = 1 
     328                     IF mean_sc_only EQ 1 THEN BEGIN 
     329                      ov1d_val = 1 
     330                     ENDIF 
    287331                     pltcmd = 'pltsc,fldrem_t1,fldrem_t2,minc,maxc,minc2,maxc2,varlegend2, boite=boxyfx'+com_strplt+',ov1d=ov1d_val, STY1D=-1, THICKN=5, SYMSIZE='+string(symbol_size)+', FRACTION=fraction' 
    288332                     printf, nulhis, strcompress(pltcmd) 
    289                      IF debug_w THEN print, pltcmd 
    290                      IF mean_sc_only NE 0 THEN res = execute(pltcmd[0]) 
     333                     IF debug_w THEN BEGIN 
     334                      print, pltcmd 
     335                     ENDIF 
     336                     IF mean_sc_only NE 0 THEN BEGIN 
     337                      res = execute(pltcmd[0]) 
     338                     ENDIF 
    291339                     IF mean_sc_only EQ 2 THEN BEGIN 
    292340                                ; add month info win[0]*win[1] 
    293341                        pltcmd = 'xyouts,fldrem_t2-(maxc2-minc2)/(0.5*win[0]*win[1]),fldrem_t1,string(long(findgen(12))+1),charsize=1.3,alignment=0.5' 
    294342                        printf, nulhis, strcompress(pltcmd) 
    295                         IF debug_w THEN print, pltcmd 
     343                        IF debug_w THEN BEGIN 
     344                         print, pltcmd 
     345                        ENDIF 
    296346                        res = execute(pltcmd[0]) 
    297347                     ENDIF 
Note: See TracChangeset for help on using the changeset viewer.