Ignore:
Timestamp:
03/15/07 11:22:28 (17 years ago)
Author:
pinsard
Message:

improvements/corrections of some *.pro headers

Location:
trunk/SRC/ToBeReviewed/CALCULS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/CALCULS/hdyn.pro

    r163 r224  
    55; 
    66; @file_comments 
    7 ; Calculate the height by rapport to a reference state for a depth reference.  
    8 ; See keywords for different possibilities. By default, the state reference  
    9 ; is rho=1020 and the depth reference is gdepw[ka] with ka the first W level  
    10 ; directly above 1000 m.  
     7; Calculate the height by rapport to a reference state for a depth reference. 
     8; See keywords for different possibilities. By default, the state reference 
     9; is rho=1020 and the depth reference is gdepw[ka] with ka the first W level 
     10; directly above 1000 m. 
    1111; 
    1212; @categories 
     
    1717; 
    1818; @param TABTN {in}{required} 
    19 ; array representing the temperature.Has the same size than SN 
     19; array representing the temperature. Has the same size than SN. 
    2020; 
    21 ; @keyword GILL We activate this key if we want to calculate the dynamic height  
    22 ; like in the GILL page 215, which means by rapport to a reference state which  
    23 ; vary in depth and which is determined by a reference temperature tref at 0°C  
    24 ; and a reference salinity sref at 35psu 
     21; @keyword GILL  
     22; We activate this key if we want to calculate the dynamic height 
     23; like in the GILL page 215, which means by rapport to a reference state which 
     24; vary in depth and which is determined by a reference temperature tref at 0°C 
     25; and a reference salinity sref at 35 psu. 
    2526; 
    2627; @keyword LEVEL 
    27 ; It is the same reference level to take. This level is defined like  
     28; It is the same reference level to take. This level is defined like 
    2829; that gdepw[level] is the reference depth 
     30; 
     31; @keyword SREF 
     32; Give a value to this keyword to change the reference salinity used in the 
     33; calculation when GILL is activated. 
    2934;  
    30 ; @keyword SREF  
    31 ; Give a value to this keyword to change the reference salinity used in the  
    32 ; calculation when GILL  is activated.  
    33 ;    
    3435; @keyword TREF 
    35 ; Give a value to this keyword to change the reference temperature used in the  
    36 ; calculation when GILL  is activated. 
    37 ;  
     36; Give a value to this keyword to change the reference temperature used in the 
     37; calculation when GILL is activated. 
     38; 
    3839; @keyword PROFREF 
    39 ; Give a depth to this keyword which will be considered as the reference depth  
    40 ; (in this case, LEVEL has not any effect). the calculation will be effectuated  
    41 ; until this depth effecting an interpolation between the the last W level above  
     40; Give a depth to this keyword which will be considered as the reference depth 
     41; (in this case, LEVEL has not any effect). the calculation will be effectuated 
     42; until this depth effecting an interpolation between the the last W level above 
    4243; PROFREF and PROFREF. 
    4344; 
     
    4647; 
    4748; @returns 
    48 ; An array of the same size of sn and tn representing the dynamic height calculated  
     49; An array of the same size of sn and tn representing the dynamic height calculated 
    4950; from a reference depth nd by rapport to a reference state. 
    5051; 
    51 ; @uses  
     52; @uses 
    5253; common.pro 
    5354; 
    5455; @restrictions 
    55 ; Points for which we can not calculate the dynamic height (whose the batymetry  
     56; Points for which we can not calculate the dynamic height (whose the batymetry 
    5657; is less deep than the reference depth) are put at the value !values.f_nan 
    5758; 
    5859; @restrictions 
    59 ; approximation: The pressure in decibars is equal to the depth in meters (the pressure increase of 1bar all 10m) 
     60; approximation: The pressure in decibars is equal to the depth in meters  
     61; (the pressure increase of 1 bar every 10 m) 
    6062; 
    6163; @history 
     
    6971;------------------------------------------------------------ 
    7072;------------------------------------------------------------ 
    71 FUNCTION hdyn,  tabsn, tabtn, TREF = tref, SREF = sref, PROFREF = profref, LEVEL = level, GILL = gill, SURFACE_LEVEL = surface_level 
     73FUNCTION hdyn, tabsn, tabtn, TREF = tref, SREF = sref, PROFREF = profref, LEVEL = level, GILL = gill, SURFACE_LEVEL = surface_level 
    7274; 
    7375  compile_opt idl2, strictarrsubs 
     
    8587      level = level-1 
    8688      za = gdepw[level] 
    87    ENDIF ELSE BEGIN  
    88       if NOT keyword_set(level) then BEGIN  
     89   ENDIF ELSE BEGIN 
     90      if NOT keyword_set(level) then BEGIN 
    8991         rien = where(gdepw LE 1000., level) 
    9092         level = level-1 
     
    9294      profref = gdepw[level] 
    9395      za = profref 
    94    ENDELSE  
     96   ENDELSE 
    9597   tailles = size(tabsn) 
    9698   taillet = size(tabtn) 
    9799   if total(tailles[0:tailles[0]] NE taillet[0:taillet[0]]) NE 0 then $ 
    98     return,  report('Les tableaux sn et tn doivent avoir la meme taille') 
    99    if tailles[3] NE jpk then return, report('La dim verticale des tableaux sn et tn doit etre egalre a jpk') 
     100    return,  report('arrays sn and tn must have the same size') 
     101   if tailles[3] NE jpk then return, report('vertical dimension of sn and tn arrarrays must be equal to jpk') 
    100102   nx = nxt 
    101103   ny = nyt 
    102104   case (size(tabsn))[0] OF 
    103       3:BEGIN  
     105      3:BEGIN 
    104106         case 1 of 
    105107            tailles[1] eq jpi and tailles[2] eq jpj: BEGIN 
     
    107109               tn = tabtn[firstxt:lastxt, firstyt:lastyt, *] 
    108110            end 
    109             tailles[1] eq  nx and tailles[2] eq  ny:BEGIN  
     111            tailles[1] eq  nx and tailles[2] eq  ny:BEGIN 
    110112               sn = tabsn 
    111113               tn = tabtn 
     
    128130         endcase 
    129131      END 
    130       4:BEGIN  
     132      4:BEGIN 
    131133         case 1 of 
    132134            tailles[1] eq jpi and tailles[2] eq jpj AND tailles[4] EQ jpt: BEGIN 
     
    134136               tn = tabtn[firstxt:lastxt, firstyt:lastyt, *, *] 
    135137            end 
    136             tailles[1] eq  nx and tailles[2] eq  ny AND tailles[4] EQ jpt:BEGIN  
     138            tailles[1] eq  nx and tailles[2] eq  ny AND tailles[4] EQ jpt:BEGIN 
    137139               sn = tabsn 
    138140               tn = tabtn 
     
    158160         endcase 
    159161      END 
    160       ELSE: return,  report('cas non code') 
     162      ELSE: return,  report('not implemented') 
    161163   ENDCASE 
    162164   varunit = 'cm' 
    163165   varname = 'Dynamic Height (href='+strtrim(round(profref), 1)+'m)' 
    164    IF keyword_set(key_performance) THEN print, 'temps hdyn', systime(1)-tempsun  
     166   IF keyword_set(key_performance) THEN print, 'temps hdyn', systime(1)-tempsun 
    165167 
    166168   return, hdyn 
  • trunk/SRC/ToBeReviewed/CALCULS/level2depth.pro

    r163 r224  
    1717; To do not mask land points. 
    1818; 
    19 ; @returns  
     19; @returns 
    2020; 2d array containing depths 
    2121; 
     
    5050;--------------------------------------------------------------- 
    5151   taille = size(niveaux) 
    52    if taille[0] NE 2 then return, report('le champ en entree doit contenir un tableau 2d') 
     52   if taille[0] NE 2 then return, report('input field must be a 2d array') 
    5353   case 1 of 
    5454      taille[1] eq jpi and taille[2] eq jpj:niveaux=niveaux[firstx:lastx, firsty:lasty] 
     
    7373   endif 
    7474; 
    75    if keyword_set(key_performance) THEN print, 'temps level2depth', systime(1)-tempsun  
     75   if keyword_set(key_performance) THEN print, 'temps level2depth', systime(1)-tempsun 
    7676   return, gdep 
    7777end 
  • trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro

    r163 r224  
    7171   endcase 
    7272   case 1 OF 
    73       taillearray[3] NE jpk:return, report('Le tableau 3d doit avoir sa 3eme dimension egale a jpk') 
     73      taillearray[3] NE jpk:return, report('2d array must have its 3d dimension equal to jpk') 
    7474      taillearray[1] eq jpi and taillearray[2] eq jpj:array=array[firstx:lastx, firsty:lasty, *] 
    7575      taillearray[1] eq  nx and taillearray[2] eq  ny: 
Note: See TracChangeset for help on using the changeset viewer.