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 508 for trunk/NEMO/OPA_SRC/in_out_manager.F90 – NEMO

Ignore:
Timestamp:
2006-10-03T17:58:55+02:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_071:RB: add iom for restart and reorganization of restart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/in_out_manager.F90

    r472 r508  
    11MODULE in_out_manager    
     2   !!====================================================================== 
     3   !!                       ***  MODULE  in_out_manager  *** 
     4   !! Ocean physics:  vertical mixing coefficient compute from the tke  
     5   !!                 turbulent closure parameterization 
     6   !!===================================================================== 
     7   !! History :   8.5  !  02-06  (G. Madec)  original code 
     8   !!             9.0  !  06-07  (S. Masson)  iom, add ctl_stop, ctl_warn 
     9   !!---------------------------------------------------------------------- 
    210 
    3    USE lib_print         ! formated print library 
     11   !!---------------------------------------------------------------------- 
     12   !!   ctl_stop   : update momentum and tracer Kz from a tke scheme 
     13   !!   ctl_warn   : initialization, namelist read, and parameters control 
     14   !!---------------------------------------------------------------------- 
    415   USE par_kind 
    516   USE par_oce 
     17   USE lib_print         ! formated print library 
    618 
    719   PUBLIC 
    820 
    921   !!---------------------------------------------------------------------- 
    10    !! namelist parameters 
    11    !! ------------------------------------- 
    12    ! namrun:  parameters of the run 
    13    CHARACTER (len=16) ::    &   !: 
    14       cexper = "exp0"           !: experiment name used for output filename 
    15     
    16    LOGICAL ::   &              !!: * namelist namrun * 
    17       ln_rstart = .FALSE. ,  &  !: start from (F) rest or (T) a restart file 
    18       ln_ctl    = .FALSE.       !: run control for debugging 
    19     
    20    INTEGER ::                & !!: * namelist namrun * 
    21       no     = 0        ,    &  !: job number 
    22       nrstdt = 0        ,    &  !: control of the time step (0, 1 or 2) 
    23       nit000 = 1        ,    &  !: index of the first time step 
    24       nitend = 10       ,    &  !: index of the last time step 
    25       ndate0 = 961115   ,    &  !: initial calendar date aammjj 
    26       nleapy = 0        ,    &  !: Leap year calendar flag (0/1 or 30) 
    27       ninist = 0        ,    &  !: initial state output flag (0/1) 
    28       nbench = 0                !: benchmark parameter (0/1) 
     22   !!                   namrun namelist parameters 
     23   !!---------------------------------------------------------------------- 
     24   CHARACTER (len=16) ::   cexper    = "exp0"        !: experiment name used for output filename 
     25   LOGICAL            ::   ln_rstart = .FALSE. ,  &  !: start from (F) rest or (T) a restart file 
     26      &                    ln_ctl    = .FALSE.       !: run control for debugging 
     27   INTEGER            ::   no     = 0        ,    &  !: job number 
     28      &                    nrstdt = 0        ,    &  !: control of the time step (0, 1 or 2) 
     29      &                    nit000 = 1        ,    &  !: index of the first time step 
     30      &                    nitend = 10       ,    &  !: index of the last time step 
     31      &                    ndate0 = 961115   ,    &  !: initial calendar date aammjj 
     32      &                    nleapy = 0        ,    &  !: Leap year calendar flag (0/1 or 30) 
     33      &                    ninist = 0        ,    &  !: initial state output flag (0/1) 
     34      &                    nbench = 0                !: benchmark parameter (0/1) 
    2935    
    3036   !!---------------------------------------------------------------------- 
    31    !! output monitoring 
    32    !! ----------------------------------- 
    33  
    34    INTEGER ::                &  !: 
    35       nstock =   10 ,        &  !: restart file frequency 
    36       nprint =    0 ,        &  !: level of print (0 no print) 
    37       nwrite =   10 ,        &  !: restart file frequency 
    38       nictls =    0 ,        &  !: Start i indice for the SUM control 
    39       nictle =    0 ,        &  !: End   i indice for the SUM control 
    40       njctls =    0 ,        &  !: Start j indice for the SUM control 
    41       njctle =    0 ,        &  !: End   j indice for the SUM control 
    42       isplt  =    1 ,        &  !: number of processors following i 
    43       jsplt  =    1 ,        &  !: number of processors following j 
    44       ijsplt =    1             !: nb of local domain = nb of processors 
     37   !!                    output monitoring 
     38   !!---------------------------------------------------------------------- 
     39   INTEGER ::   nstock =   10 ,        &  !: restart file frequency 
     40      &         nprint =    0 ,        &  !: level of print (0 no print) 
     41      &         nwrite =   10 ,        &  !: restart file frequency 
     42      &         nictls =    0 ,        &  !: Start i indice for the SUM control 
     43      &         nictle =    0 ,        &  !: End   i indice for the SUM control 
     44      &         njctls =    0 ,        &  !: Start j indice for the SUM control 
     45      &         njctle =    0 ,        &  !: End   j indice for the SUM control 
     46      &         isplt  =    1 ,        &  !: number of processors following i 
     47      &         jsplt  =    1 ,        &  !: number of processors following j 
     48      &         ijsplt =    1             !: nb of local domain = nb of processors 
    4549 
    4650   !!---------------------------------------------------------------------- 
    47    !! logical units 
    48    !! ------------------------------ 
    49    INTEGER ::                &  !: 
    50       numstp     =  1 ,      &  !: logical unit for time step 
    51       numout     =  2 ,      &  !: logical unit for output print 
    52       numnam     =  3 ,      &  !: logical unit for namelist 
    53       numnam_ice =  4 ,      &  !: logical unit for ice namelist 
    54       numevo_ice = 17 ,      &  !: logical unit for ice variables (temp. evolution) 
    55       numice_dmp = 18 ,      &  !: logical unit for ice variables (damping) 
    56       numsol     = 25 ,      &  !: logical unit for solver statistics 
    57       numwri     = 40 ,      &  !: logical unit for output write 
    58       numisp     = 41 ,      &  !: logical unit for island statistics 
    59       numgap     = 45 ,      &  !: logical unit for differences diagnostic 
    60       numbol     = 67 ,      &  !: logical unit for "bol" diagnostics 
    61       numptr     = 68 ,      &  !: logical unit for Poleward TRansports 
    62       numflo     = 69           !: logical unit for drifting floats 
    63       !                         !: * coupled units 
     51   !!                        logical units 
     52   !!---------------------------------------------------------------------- 
     53   INTEGER ::   numstp     =  1 ,      &  !: logical unit for time step 
     54      &         numout     =  2 ,      &  !: logical unit for output print 
     55      &         numnam     =  3 ,      &  !: logical unit for namelist 
     56      &         numnam_ice =  4 ,      &  !: logical unit for ice namelist 
     57      &         numevo_ice = 17 ,      &  !: logical unit for ice variables (temp. evolution) 
     58      &         numsol     = 25 ,      &  !: logical unit for solver statistics 
     59      &         numwri     = 40 ,      &  !: logical unit for output write 
     60      &         numisp     = 41 ,      &  !: logical unit for island statistics 
     61      &         numgap     = 45 ,      &  !: logical unit for differences diagnostic 
     62      &         numbol     = 67 ,      &  !: logical unit for "bol" diagnostics 
     63      &         numptr     = 68 ,      &  !: logical unit for Poleward TRansports 
     64      &         numflo     = 69           !: logical unit for drifting floats 
    6465 
    6566   !!---------------------------------------------------------------------- 
     
    6768   !!---------------------------------------------------------------------- 
    6869    
    69    INTEGER ::                &  !: 
    70       nstop = 0 ,            &  !: e r r o r  flag (=number of reason for a 
    71       !                         !                   prematurely stop the run) 
    72       nwarn = 0                 !: w a r n i n g  flag (=number of warning 
    73       !                         !                       found during the run) 
    74  
    75     
    76    CHARACTER(LEN=100) :: ctmp1, ctmp2, ctmp3    ! temporary character 
    77    CHARACTER (len=64) ::        &                                                    !: 
    78       cform_err="(/,' ===>>> : E R R O R',     /,'         ===========',/)"    ,   & !: 
    79       cform_war="(/,' ===>>> : W A R N I N G', /,'         ===============',/)"      !: 
    80    LOGICAL ::   &               !: 
    81       lwp                ,   &  !: boolean : true on the 1st processor only 
    82       lsp_area = .TRUE.         !: to make a control print over a specific area 
     70   INTEGER            ::   nstop = 0 ,           &  !: error flag (=number of reason for a premature stop run) 
     71      &                    nwarn = 0                !: warning flag (=number of warning found during the run) 
     72   CHARACTER(LEN=100) ::   ctmp1, ctmp2, ctmp3      !: temporary character 
     73   CHARACTER (len=64) ::   cform_err="(/,' ===>>> : E R R O R',     /,'         ===========',/)"    ,   &  !: 
     74      &                    cform_war="(/,' ===>>> : W A R N I N G', /,'         ===============',/)"       !: 
     75   LOGICAL            ::   lwp               ,   &  !: boolean : true on the 1st processor only 
     76      &                    lsp_area = .TRUE.        !: to make a control print over a specific area 
    8377   !!---------------------------------------------------------------------- 
    8478   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    8579   !! $Header$  
    86    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     80   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    8781   !!---------------------------------------------------------------------- 
    8882 
    89  
    9083CONTAINS 
    91  
    9284 
    9385   SUBROUTINE ctl_stop( cd1, cd2, cd3, cd4, cd5,   & 
     
    9688      !!                  ***  ROUTINE  stop_opa  *** 
    9789      !! 
    98       !! ** Purpose : ??? 
    99       !! 
     90      !! ** Purpose : ??? blah blah.... 
    10091      !!----------------------------------------------------------------------- 
    101       CHARACTER(len=*),INTENT(in),OPTIONAL ::  cd1, cd2, cd3, cd4, cd5, cd6, cd7, cd8, cd9, cd10 
     92      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5,   & 
     93         &                                       cd6, cd7, cd8, cd9, cd10 
    10294      !!----------------------------------------------------------------------- 
    103        
     95      ! 
    10496      nstop = nstop + 1  
    10597      IF(lwp) THEN 
     
    117109      ENDIF 
    118110      CALL FLUSH(numout) 
    119  
     111      ! 
    120112   END SUBROUTINE ctl_stop 
    121113 
     
    124116      &                 cd6, cd7, cd8, cd9, cd10 ) 
    125117      !!----------------------------------------------------------------------- 
    126       !!                  ***  ROUTINE  stop_opa  *** 
     118      !!                  ***  ROUTINE  stop_warn  *** 
    127119      !! 
    128       !! ** Purpose : ??? 
    129       !! 
     120      !! ** Purpose : ???  blah blah.... 
    130121      !!----------------------------------------------------------------------- 
    131       CHARACTER(len=*),INTENT(in),OPTIONAL ::  cd1, cd2, cd3, cd4, cd5, cd6, cd7, cd8, cd9, cd10 
     122      CHARACTER(len=*), INTENT(in), OPTIONAL ::  cd1, cd2, cd3, cd4, cd5,   & 
     123         &                                       cd6, cd7, cd8, cd9, cd10 
    132124      !!----------------------------------------------------------------------- 
    133        
     125      !  
    134126      nwarn = nwarn + 1  
    135127      IF(lwp) THEN 
     
    147139      ENDIF 
    148140      CALL FLUSH(numout) 
    149  
     141      ! 
    150142   END SUBROUTINE ctl_warn 
    151143 
     144   !!===================================================================== 
    152145END MODULE in_out_manager 
Note: See TracChangeset for help on using the changeset viewer.