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 12365 – NEMO

Changeset 12365


Ignore:
Timestamp:
2020-02-11T10:24:44+01:00 (4 years ago)
Author:
timgraham
Message:

Bug fix for iceberg restart files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_starthour_obsoper/NEMOGCM/NEMO/OPA_SRC/ICB/icbstp.F90

    r6486 r12365  
    6060      !!---------------------------------------------------------------------- 
    6161      INTEGER, INTENT(in) ::   kt   ! time step index 
     62      INTEGER             ::   ii   ! loop index 
    6263      ! 
    6364      LOGICAL ::   ll_sample_traj, ll_budget, ll_verbose   ! local logical 
     
    140141      CALL icb_dia( ll_budget ) 
    141142 
    142       IF( MOD(kt,nn_stock) == 0 ) THEN 
     143      IF( ln_rst_list ) THEN 
     144         DO ii=1,10 
     145            IF(nstocklist(ii)==kt) THEN  
     146               CALL icb_rst_write( kt ) 
     147               EXIT 
     148            END IF 
     149         END DO 
     150      ELSE IF( MOD(kt,nn_stock) == 0 ) THEN 
    143151         CALL icb_rst_write( kt ) 
    144152         IF( nn_sample_rate > 0 )   CALL icb_trj_sync() 
     
    160168      !!---------------------------------------------------------------------- 
    161169 
    162       ! only write a restart if not done in icb_stp 
    163       IF( MOD(kt,nn_stock) .NE. 0 ) CALL icb_rst_write( kt ) 
     170      ! only write a restart if not done in icb_stp and not using restart list 
     171      IF( ( MOD(kt,nn_stock) .NE. 0 ) .AND. (.NOT. ln_rst_list) )      & 
     172           CALL icb_rst_write( kt ) 
    164173 
    165174      ! finish with trajectories if they were written 
Note: See TracChangeset for help on using the changeset viewer.