Changeset 19


Ignore:
Timestamp:
05/15/07 15:07:51 (17 years ago)
Author:
pinsard
Message:

some improvements on validation of step 1 and begining of parametrisation to orcares

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/condmag_on_orca.pro

    r18 r19  
    2929; @restrictions 
    3030;  - Requires SAXO tools 
    31 ;  - must have condmag.nc in ${GEOMAG_ID}/ 
    32 ;  - must have meshmask for ORCA2 or ORCA025 in ${GEOMAG_ID}/ 
    33 ;  - must not have cond_sed_*.nc in ${GEOMAG_OD}/ 
    34 ;  - must not have Br_*.nc in ${GEOMAG_OD}/ 
    3531; 
    3632; @todo 
     
    4238; 
    4339; @pre 
    44 ; be sure to have datafile condmag.nc in the directory defined in 
    45 ; ${GEOMAG_ID}/ see geomag_env.sh 
     40; see geomag_profile.sh 
     41; be sure to have condmag.nc in the directory defined in 
     42; ${GEOMAG_ID}/ 
    4643; be sure to have meshmask of ORCA grid you choose in the directory defined in 
    4744; ${GEOMAG_ID}/ 
     
    5148; 
    5249; @post 
     50; see geomag_profile.sh 
    5351; cond_sed_<I>orcasres</I>.nc is now present in ${GEOMAG_OD}/ 
    5452; Br_<I>orcasres</I>.nc is now present in ${GEOMAG_OD}/ 
    55 ; see geomag_env.sh 
    5653; 
    5754; @examples 
  • trunk/condmag_output.pro

    r18 r19  
    9191     'ORCA2': BEGIN 
    9292                 msg = 'iii : valid orcares parameter = ' +  orcares 
    93                  PRINT, msg 
     93                 ras = report(msg) 
    9494              END 
    9595     'ORCA025': BEGIN 
    9696                 msg = 'iii : valid orcares parameter = ' +  orcares 
    97                  PRINT, msg 
     97                 ras = report(msg) 
    9898              END 
    9999      ELSE  : BEGIN 
    100100                 msg = 'eee : invalid orcares parameter = ' + orcares 
    101                  PRINT, msg 
     101                 ras = report(msg) 
    102102                 msg = 'eee : orcares must be ORCA2 or ORCA025' 
    103                  PRINT, msg 
     103                 ras = report(msg) 
    104104                 RETURN 
    105105              END 
     
    111111     'cond_sed': BEGIN 
    112112                    msg = 'iii : valid variable.NAME parameter = ' + variable.NAME 
    113                     PRINT, msg 
     113                    ras = report(msg) 
    114114                    CASE title OF 
    115115                       'Conductance': BEGIN 
    116116                                     msg = 'iii : valid title parameter = ' + title 
    117                                      PRINT, msg 
     117                                     ras = report(msg) 
    118118                                  END 
    119119                        ELSE      : BEGIN 
    120120                                      msg = 'eee : invalid title parameter = ' + title 
    121                                       PRINT, msg 
     121                                      ras = report(msg) 
    122122                                      msg = 'eee : title must be Conductance' 
    123                                       PRINT, msg 
     123                                      ras = report(msg) 
    124124                                      RETURN 
    125125                                   END 
     
    128128                       'Conductance': BEGIN 
    129129                                     msg = 'iii : valid long_name parameter = ' + long_name 
    130                                      PRINT, msg 
     130                                     ras = report(msg) 
    131131                                  END 
    132132                        ELSE      : BEGIN 
    133133                                      msg = 'eee : invalid long_name parameter = ' + long_name 
    134                                       PRINT, msg 
     134                                      ras = report(msg) 
    135135                                      msg = 'eee : long_name must be Conductance' 
    136                                       PRINT, msg 
     136                                      ras = report(msg) 
    137137                                      RETURN 
    138138                                   END 
     
    141141                       'siemens': BEGIN 
    142142                                     msg = 'iii : valid units parameter = ' + units 
    143                                      PRINT, msg 
     143                                     ras = report(msg) 
    144144                                  END 
    145145                        ELSE      : BEGIN 
    146146                                      msg = 'eee : invalid units parameter = ' + units 
    147                                       PRINT, msg 
     147                                      ras = report(msg) 
    148148                                      msg = 'eee : units must be siemens' 
    149                                       PRINT, msg 
     149                                      ras = report(msg) 
    150150                                      RETURN 
    151151                                   END 
     
    154154     'Br'  : BEGIN 
    155155                    msg = 'iii : valid variable.NAME parameter = ' + variable.NAME 
    156                     PRINT, msg 
     156                    ras = report(msg) 
    157157                    CASE title OF 
    158158                       'Magnetic field': BEGIN 
    159159                                     msg = 'iii : valid title parameter = ' + title 
    160                                      PRINT, msg 
     160                                     ras = report(msg) 
    161161                                  END 
    162162                        ELSE      : BEGIN 
    163163                                      msg = 'eee : invalid title parameter = ' + title 
    164                                       PRINT, msg 
     164                                      ras = report(msg) 
    165165                                      msg = 'eee : title must be Magnetic field' 
    166                                       PRINT, msg 
     166                                      ras = report(msg) 
    167167                                      RETURN 
    168168                                   END 
     
    171171                       'magnetic field': BEGIN 
    172172                                     msg = 'iii : valid long_name parameter = ' + long_name 
    173                                      PRINT, msg 
     173                                     ras = report(msg) 
    174174                                  END 
    175175                        ELSE      : BEGIN 
    176176                                      msg = 'eee : invalid long_name parameter = ' + long_name 
    177                                       PRINT, msg 
     177                                      ras = report(msg) 
    178178                                      msg = 'eee : long_name must be magnetic field' 
    179                                       PRINT, msg 
     179                                      ras = report(msg) 
    180180                                      RETURN 
    181181                                   END 
     
    184184                       'tesla': BEGIN 
    185185                                     msg = 'iii : valid units parameter = ' + units 
    186                                      PRINT, msg 
     186                                     ras = report(msg) 
    187187                                  END 
    188188                        ELSE      : BEGIN 
    189189                                      msg = 'eee : invalid units parameter = ' + units 
    190                                       PRINT, msg 
     190                                      ras = report(msg) 
    191191                                      msg = 'eee : units must be tesla' 
    192                                       PRINT, msg 
     192                                      ras = report(msg) 
    193193                                      RETURN 
    194194                                   END 
     
    197197     ELSE      : BEGIN 
    198198                    msg = 'eee : invalid variable.NAME parameter = ' + variable.NAME 
    199                     PRINT, msg 
     199                    ras = report(msg) 
    200200                    msg = 'eee : variable.NAME must be cond_sed or Br' 
    201                     PRINT, msg 
     201                    ras = report(msg) 
    202202                    RETURN 
    203203                 END 
     
    207207  IF jpio LT 1 THEN BEGIN 
    208208     msg = ' eee : invalid jpio parameter = ' + STRING(jpio) 
    209      PRINT, msg 
     209     ras = report(msg) 
    210210     msg = ' eee : jpio must be greater or equal to 1' 
    211      PRINT, msg 
     211     ras = report(msg) 
    212212     RETURN 
    213213  ENDIF ELSE BEGIN 
    214214     msg = 'iii : valid jpio parameter = ' + STRING(jpio) 
    215      PRINT, msg 
     215     ras = report(msg) 
    216216  ENDELSE 
    217217; 
     
    219219  IF jpjo LT 1 THEN BEGIN 
    220220     msg = ' eee : invalid jpjo parameter = ' + STRING(jpjo) 
    221      PRINT, msg 
     221     ras = report(msg) 
    222222     msg = ' eee : jpjo must be greater or equal to 1' 
    223      PRINT, msg 
     223     ras = report(msg) 
    224224     RETURN 
    225225  ENDIF ELSE BEGIN 
    226226     msg = 'iii : valid jpjo parameter = ' + STRING(jpjo) 
    227      PRINT, msg 
     227     ras = report(msg) 
    228228  ENDELSE 
    229229; 
     
    232232  IF (N_ELEMENTS(olon) NE jpio*jpjo) THEN BEGIN 
    233233     msg = ' eee : invalid nb of elements of olon parameter = ' + STRING(N_ELEMENTS(olon)) 
    234      PRINT, msg 
     234     ras = report(msg) 
    235235     msg = ' eee : nb of elements of olon must be equal to jpio*jpjo = ' + STRING(jpio*jpjo) 
    236      PRINT, msg 
     236     ras = report(msg) 
    237237     RETURN 
    238238  ENDIF ELSE BEGIN 
    239239     msg = 'iii : valid nb of elements olon parameter' 
    240      PRINT, msg 
     240     ras = report(msg) 
    241241  ENDELSE 
    242242; 
     
    247247     '' : BEGIN 
    248248             msg = 'eee : ${GEOMAG_OD} is not defined' 
    249              PRINT, msg 
     249             ras = report(msg) 
    250250             RETURN 
    251251          END 
    252252     ELSE: BEGIN 
    253253             msg = 'iii : ${GEOMAG_OD} is ' + geomag_od_env 
    254              PRINT, msg 
     254             ras = report(msg) 
    255255           END 
    256256  ENDCASE 
     
    262262  IF (FILE_TEST(iodirout, /DIRECTORY,/WRITE) EQ 0) THEN BEGIN 
    263263     msg = 'eee : the directory' + iodirout  + ' was not found.' 
    264      PRINT, msg 
     264     ras = report(msg) 
    265265     RETURN 
    266266  ENDIF 
     
    273273  IF (FILE_TEST(fullfilename) EQ 1) THEN BEGIN 
    274274     msg = 'eee : the file ' + fullfilename  + ' already exists.' 
    275      PRINT, msg 
     275     ras = report(msg) 
    276276     RETURN 
    277277  ENDIF 
     
    355355; 
    356356  msg = 'iii : ' + fullfilename + ' created' 
    357   PRINT, msg 
     357  ras = report(msg) 
    358358; 
    359359END 
  • trunk/initorca2_bab.pro

    r17 r19  
    1010; @todo 
    1111; parametrisation for ORCA025 
     12; can I use CASE statement in a file called by @...++ 
     13; can I use RETURN or STOP statement in a file called by @...++ 
    1214; 
    1315; zminmesh and izmaxmesh may be set to 0,0 because we only work with  
     
    3133@cm_4data 
    3234; 
    33 ;--------------------------------------------------------- 
     35 
     36; test if ${GEOMAG_ID} defined 
     37geomag_id_env=GETENV('GEOMAG_ID') 
     38; ++ pb syntaxe case dans @... 
     39 
     40iodirin = isadirectory(geomag_id_env) 
     41; 
     42; existence and protection of ${GEOMAG_ID} ++ 
     43 
     44filename_oce='meshmask_bab.nc' 
     45; check if this file exists 
     46fullfilename_oce = isafile(iodirin + filename_oce, NEW=0, /MUST_EXIST, $ 
     47                     RECURSIVE=0) 
     48print,fullfilename_oce[0] 
     49 
     50;-------------------------------------------------------- 
    3451; boundaries of the read grid regarding to the original grid 
    3552;---------------------------------------------------------- 
     
    4966; read the grid 
    5067;------------------------------------------------------ 
    51 iodir = '/usr/work/sur/fvi/OPA/ORCA2/' 
    5268 
    5369key_stride = [1, 1, 1] 
    54 ncdf_meshlec, 'meshmask_bab.nc', glamboundary = [20, 380] 
     70ncdf_meshlec, fullfilename_oce[0], glamboundary = [20, 380] 
    5571;------------------------------------------------------------- 
    5672domdef 
  • trunk/step1_diff.pro

    r17 r19  
    6565IF fullfile1[0] EQ '' THEN BEGIN 
    6666   msg = 'eee : the file ' + fullfile1 + ' was not found.' 
    67    PRINT, msg 
     67   ras = report(msg) 
    6868   RETURN 
    6969ENDIF 
     
    7272IF (FILE_TEST(fullfile1[0], /READ) EQ 0) THEN BEGIN 
    7373   msg = 'eee : the file ' + fullfile1[0] + ' is not readable.' 
    74    PRINT, msg 
     74   ras = report(msg) 
    7575   RETURN 
    7676ENDIF 
     
    8080IF fullfile2[0] EQ '' THEN BEGIN 
    8181   msg = 'eee : the file ' + fullfile2 + ' was not found.' 
    82    PRINT, msg 
     82   ras = report(msg) 
    8383   RETURN 
    8484ENDIF 
     
    8787IF (FILE_TEST(fullfile2[0], /READ) EQ 0) THEN BEGIN 
    8888   msg = 'eee : the file ' + fullfile2[0] + ' is not readable.' 
    89    PRINT, msg 
     89   ras = report(msg) 
    9090   RETURN 
    9191ENDIF 
     
    107107IF count EQ 0 THEN BEGIN 
    108108   msg = 'iii : delta is zero everywhere' 
    109    PRINT, msg 
     109   ras = report(msg) 
    110110ENDIF ELSE BEGIN 
    111111   msg = 'iii : delta is not zero ' + STRING(count)  + ' times' 
    112    PRINT, msg 
     112   ras = report(msg) 
    113113ENDELSE 
    114114; 
     
    118118IF (FILE_TEST(file3) EQ 1) THEN BEGIN 
    119119   msg = 'eee : the file ' + file3  + ' already exists.' 
    120    PRINT, msg 
     120   ras = report(msg) 
    121121   RETURN 
    122122ENDIF 
     
    202202; 
    203203  msg = 'iii : ' + file3 + ' created' 
    204   PRINT, msg 
     204  ras = report(msg) 
    205205; 
    206206END 
Note: See TracChangeset for help on using the changeset viewer.