New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 1324 for trunk/NEMO/OFF_SRC/IOM/in_out_manager.F90 – NEMO

Ignore:
Timestamp:
2009-02-20T11:00:03+01:00 (15 years ago)
Author:
cetlod
Message:

update IOM and lib_mpp modules, see ticket:348

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OFF_SRC/IOM/in_out_manager.F90

    r1312 r1324  
    55   !!                 turbulent closure parameterization 
    66   !!===================================================================== 
    7    !! History :   8.5  !  02-06  (G. Madec)  original code 
    8    !!             9.0  !  06-07  (S. Masson)  iom, add ctl_stop, ctl_warn 
     7   !! History :   1.0  !  2002-06  (G. Madec)  original code 
     8   !!             2.0  !  2006-07  (S. Masson)  iom, add ctl_stop, ctl_warn 
     9   !!             3.0  !  2008-06  (G. Madec)  add ctmp4 to ctmp10 
    910   !!---------------------------------------------------------------------- 
    1011 
     
    1213   !!   ctl_stop   : update momentum and tracer Kz from a tke scheme 
    1314   !!   ctl_warn   : initialization, namelist read, and parameters control 
     15   !!   getunit    : give the index of an unused logical unit 
    1416   !!---------------------------------------------------------------------- 
    15    USE par_kind 
    16    USE par_oce 
    17    USE lib_print         ! formated print library 
     17   USE par_kind        ! kind definition 
     18   USE par_oce         ! ocean parameter 
     19   USE lib_print       ! formated print library 
    1820 
    1921   IMPLICIT NONE 
     
    2325   !!                   namrun namelist parameters 
    2426   !!---------------------------------------------------------------------- 
    25    CHARACTER (len=16) ::   cexper     = "exp0"    !: experiment name used for output filename 
    26    LOGICAL            ::   ln_rstart  = .FALSE.   !: start from (F) rest or (T) a restart file 
    27    INTEGER            ::   no         = 0         !: job number 
    28    INTEGER            ::   nrstdt     = 0         !: control of the time step (0, 1 or 2) 
    29    INTEGER            ::   nn_rstssh  = 0         !: hand made initilization of ssh or not (1/0) 
    30    INTEGER            ::   nit000     = 1         !: index of the first time step 
    31    INTEGER            ::   nitend     = 10        !: index of the last time step 
    32    INTEGER            ::   ndate0     = 961115    !: initial calendar date aammjj 
    33    INTEGER            ::   nleapy     = 0         !: Leap year calendar flag (0/1 or 30) 
    34    INTEGER            ::   ninist     = 0         !: initial state output flag (0/1) 
    35    LOGICAL            ::   ln_dimgnnn = .FALSE.   !: type of dimgout. (F): 1 file for all proc 
    36                                                   !:                  (T): 1 file per proc 
    37    LOGICAL            ::   ln_mskland = .FALSE.   !: mask land points in NetCDF outputs (costly: + ~15%) 
     27   CHARACTER(len=16)  ::   cexper        = "exp0"      !: experiment name used for output filename 
     28   CHARACTER(len=32)  ::   cn_ocerst_in  = "restart"   !: suffix of ocean restart name (input) 
     29   CHARACTER(len=32)  ::   cn_ocerst_out = "restart"   !: suffix of ocean restart name (output) 
     30   LOGICAL            ::   ln_rstart     = .FALSE.     !: start from (F) rest or (T) a restart file 
     31   INTEGER            ::   no            = 0           !: job number 
     32   INTEGER            ::   nrstdt        = 0           !: control of the time step (0, 1 or 2) 
     33   INTEGER            ::   nn_rstssh     = 0           !: hand made initilization of ssh or not (1/0) 
     34   INTEGER            ::   nit000        = 1           !: index of the first time step 
     35   INTEGER            ::   nitend        = 10          !: index of the last time step 
     36   INTEGER            ::   ndate0        = 961115      !: initial calendar date aammjj 
     37   INTEGER            ::   nleapy        = 0           !: Leap year calendar flag (0/1 or 30) 
     38   INTEGER            ::   ninist        = 0           !: initial state output flag (0/1) 
     39   LOGICAL            ::   ln_dimgnnn    = .FALSE.     !: type of dimgout. (F): 1 file for all proc 
     40                                                       !:                  (T): 1 file per proc 
     41   LOGICAL            ::   ln_mskland    = .FALSE.     !: mask land points in NetCDF outputs (costly: + ~15%) 
    3842   !!---------------------------------------------------------------------- 
    3943   !! was in restart but moved here because of the OFF line... better solution should be found... 
    4044   !!---------------------------------------------------------------------- 
    4145   INTEGER            ::   nitrst                 !: time step at which restart file should be written 
     46#if defined key_zdftke2 
     47   INTEGER            ::   nitrst_tke2            !: time step at which restart file should be written 
     48#endif 
    4249   !!---------------------------------------------------------------------- 
    4350   !!                    output monitoring 
     
    7885   INTEGER            ::   nstop = 0                !: error flag (=number of reason for a premature stop run) 
    7986   INTEGER            ::   nwarn = 0                !: warning flag (=number of warning found during the run) 
    80    CHARACTER(len=200) ::   ctmp1, ctmp2, ctmp3      !: temporary character 
     87   CHARACTER(len=200) ::   ctmp1, ctmp2, ctmp3      !: temporary characters 1 to 3 
     88   CHARACTER(len=200) ::   ctmp4, ctmp5, ctmp6      !: temporary characters 4 to 6 
     89   CHARACTER(len=200) ::   ctmp7, ctmp8, ctmp9      !: temporary characters 7 to 9 
     90   CHARACTER(len=200) ::   ctmp10                   !: temporary character 10 
    8191   CHARACTER (len=64) ::   cform_err = "(/,' ===>>> : E R R O R',     /,'         ===========',/)"       !: 
    8292   CHARACTER (len=64) ::   cform_war = "(/,' ===>>> : W A R N I N G', /,'         ===============',/)"   !: 
     
    8494   LOGICAL            ::   lsp_area = .TRUE.        !: to make a control print over a specific area 
    8595   !!---------------------------------------------------------------------- 
    86    !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    87    !! $Id$  
     96   !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008)  
     97   !! $Id$ 
    8898   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    8999   !!---------------------------------------------------------------------- 
     
    93103   SUBROUTINE ctl_stop( cd1, cd2, cd3, cd4, cd5,   & 
    94104      &                 cd6, cd7, cd8, cd9, cd10 ) 
    95       !!----------------------------------------------------------------------- 
     105      !!---------------------------------------------------------------------- 
    96106      !!                  ***  ROUTINE  stop_opa  *** 
    97107      !! 
    98       !! ** Purpose : ??? blah blah.... 
    99       !!----------------------------------------------------------------------- 
     108      !! ** Purpose :   print in ocean.outpput file a error message and  
     109      !!                increment the error number (nstop) by one. 
     110      !!---------------------------------------------------------------------- 
    100111      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5 
    101112      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd6, cd7, cd8, cd9, cd10 
    102       !!----------------------------------------------------------------------- 
     113      !!---------------------------------------------------------------------- 
    103114      ! 
    104115      nstop = nstop + 1  
     
    123134   SUBROUTINE ctl_warn( cd1, cd2, cd3, cd4, cd5,   & 
    124135      &                 cd6, cd7, cd8, cd9, cd10 ) 
    125       !!----------------------------------------------------------------------- 
     136      !!---------------------------------------------------------------------- 
    126137      !!                  ***  ROUTINE  stop_warn  *** 
    127138      !! 
    128       !! ** Purpose : ???  blah blah.... 
    129       !!----------------------------------------------------------------------- 
     139      !! ** Purpose :   print in ocean.outpput file a error message and  
     140      !!                increment the warning number (nwarn) by one. 
     141      !!---------------------------------------------------------------------- 
    130142      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5 
    131143      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd6, cd7, cd8, cd9, cd10 
    132       !!----------------------------------------------------------------------- 
     144      !!---------------------------------------------------------------------- 
    133145      !  
    134146      nwarn = nwarn + 1  
     
    152164 
    153165   FUNCTION getunit() 
    154      !!----------------------------------------------------------------------- 
    155      !!                  ***  FUNCTION  getunit  *** 
    156      !! 
    157      !! ** Purpose : ???  blah blah.... 
    158      !!----------------------------------------------------------------------- 
    159      INTEGER :: getunit 
    160      LOGICAL :: llopn  
    161      !--------------------------------------------------------------------- 
    162      getunit = 15   ! choose a unit that is big enough then it is 
    163                     !  not already used in OPA 
    164      llopn = .TRUE. 
    165      DO WHILE( (getunit < 998) .AND. llopn ) 
    166         getunit = getunit + 1 
    167         INQUIRE( unit = getunit, opened = llopn ) 
    168      END DO 
    169      IF( (getunit == 999) .AND. llopn ) THEN 
    170         CALL ctl_stop( 'getunit: All logical units until 999 are used...' ) 
    171         getunit = -1 
    172      ENDIF 
    173  
     166      !!---------------------------------------------------------------------- 
     167      !!                  ***  FUNCTION  getunit  *** 
     168      !! 
     169      !! ** Purpose :   return the index of an unused logical unit 
     170      !!---------------------------------------------------------------------- 
     171      INTEGER :: getunit 
     172      LOGICAL :: llopn  
     173      !!---------------------------------------------------------------------- 
     174      ! 
     175      getunit = 15   ! choose a unit that is big enough then it is not already used in NEMO 
     176      llopn = .TRUE. 
     177      DO WHILE( (getunit < 998) .AND. llopn ) 
     178         getunit = getunit + 1 
     179         INQUIRE( unit = getunit, opened = llopn ) 
     180      END DO 
     181      IF( (getunit == 999) .AND. llopn ) THEN 
     182         CALL ctl_stop( 'getunit: All logical units until 999 are used...' ) 
     183         getunit = -1 
     184      ENDIF 
     185      ! 
    174186   END FUNCTION getunit 
    175187 
Note: See TracChangeset for help on using the changeset viewer.