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 14072 for NEMO/trunk/src/OCE/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/IOM/restart.F90

    r14053 r14072  
    1919   !!   rst_read   : read the ocean restart file 
    2020   !!---------------------------------------------------------------------- 
    21    USE oce             ! ocean dynamics and tracers  
     21   USE oce             ! ocean dynamics and tracers 
    2222   USE dom_oce         ! ocean space and time domain 
    23    USE sbc_ice         ! only lk_si3  
     23   USE sbc_ice         ! only lk_si3 
    2424   USE phycst          ! physical constants 
    2525   USE eosbn2          ! equation of state            (eos bn2 routine) 
     
    4949      !!--------------------------------------------------------------------- 
    5050      !!                   ***  ROUTINE rst_opn  *** 
    51       !!                      
    52       !! ** Purpose : + initialization (should be read in the namelist) of nitrst  
     51      !! 
     52      !! ** Purpose : + initialization (should be read in the namelist) of nitrst 
    5353      !!              + open the restart when we are one time step before nitrst 
    5454      !!                   - restart header is defined when kt = nitrst-1 
     
    6666      ! 
    6767      IF( kt == nit000 ) THEN   ! default definitions 
    68          lrst_oce = .FALSE.    
     68         lrst_oce = .FALSE. 
    6969         IF( ln_rst_list ) THEN 
    7070            nrst_lst = 1 
     
    7474         ENDIF 
    7575      ENDIF 
    76        
     76 
    7777      IF( .NOT. ln_rst_list .AND. nn_stock == -1 )   RETURN   ! we will never do any restart 
    7878 
    7979      ! frequency-based restart dumping (nn_stock) 
    80       IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN    
     80      IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 
    8181         ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 
    8282         nitrst = kt + nn_stock - 1                  ! define the next value of nitrst for restart writing 
     
    8787      ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 
    8888      IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    89          IF( nitrst <= nitend .AND. nitrst > 0 ) THEN  
     89         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    9090            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    9191            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     
    115115                  clpname = clname 
    116116               ELSE 
    117                   clpname = TRIM(Agrif_CFixed())//"_"//clname    
     117                  clpname = TRIM(Agrif_CFixed())//"_"//clname 
    118118               ENDIF 
    119119               numrow = iom_xios_setid(TRIM(clpath)//TRIM(clpname)) 
     
    135135      !!--------------------------------------------------------------------- 
    136136      !!                   ***  ROUTINE rstwrite  *** 
    137       !!                      
     137      !! 
    138138      !! ** Purpose :   Write restart fields in NetCDF format 
    139139      !! 
     
    164164                     CALL iom_rstput( kt, nitrst, numrow, 'rhop'   , rhop      ) 
    165165      ENDIF 
    166        
    167       IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst )   
     166 
     167      IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst ) 
    168168      IF( kt == nitrst ) THEN 
    169169         IF(.NOT.lwxios) THEN 
     
    187187 
    188188   SUBROUTINE rst_read_open 
    189       !!----------------------------------------------------------------------  
     189      !!---------------------------------------------------------------------- 
    190190      !!                   ***  ROUTINE rst_read_open  *** 
    191       !!  
     191      !! 
    192192      !! ** Purpose :   Open read files for NetCDF restart 
    193       !!  
     193      !! 
    194194      !! ** Method  :   Use a non-zero, positive value of numror to assess whether or not 
    195195      !!                the file has already been opened 
     
    222222!               clpname = cn_ocerst_in 
    223223!            ELSE 
    224 !               clpname = TRIM(Agrif_CFixed())//"_"//cn_ocerst_in    
     224!               clpname = TRIM(Agrif_CFixed())//"_"//cn_ocerst_in 
    225225!            ENDIF 
    226226             CALL iom_init( cr_ocerst_cxt, kdid = numror, ld_closedef = .TRUE. ) 
     
    234234 
    235235   SUBROUTINE rst_read( Kbb, Kmm ) 
    236       !!----------------------------------------------------------------------  
     236      !!---------------------------------------------------------------------- 
    237237      !!                   ***  ROUTINE rst_read  *** 
    238       !!  
     238      !! 
    239239      !! ** Purpose :   Read velocity and T-S fields in the restart file 
    240       !!  
     240      !! 
    241241      !! ** Method  :   Read in restart.nc fields which are necessary for restart 
    242242      !! 
     
    255255      IF(.NOT.lrxios ) CALL iom_delay_rst( 'READ', 'OCE', numror )   ! read only ocean delayed global communication variables 
    256256      ! 
    257       !                             !*  Diurnal DSST  
    258       IF( ln_diurnal )   CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst )  
    259       IF ( ln_diurnal_only ) THEN  
     257      !                             !*  Diurnal DSST 
     258      IF( ln_diurnal )   CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst ) 
     259      IF ( ln_diurnal_only ) THEN 
    260260         IF(lwp) WRITE( numout, * ) & 
    261          &   "rst_read:- ln_diurnal_only set, setting rhop=rho0"  
     261         &   "rst_read:- ln_diurnal_only set, setting rhop=rho0" 
    262262         rhop = rho0 
    263          CALL iom_get( numror, jpdom_auto, 'tn'     , w3d )  
     263         CALL iom_get( numror, jpdom_auto, 'tn'     , w3d ) 
    264264         ts(:,:,1,jp_tem,Kmm) = w3d(:,:,1) 
    265          RETURN  
    266       ENDIF   
     265         RETURN 
     266      ENDIF 
    267267      ! 
    268268      !                             !*  Read Kmm fields 
     
    289289         CALL iom_get( numror, jpdom_auto, 'rhop'   , rhop )   ! now    potential density 
    290290      ELSE 
    291          CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) )    
     291         CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) ) 
    292292      ENDIF 
    293293      ! 
Note: See TracChangeset for help on using the changeset viewer.