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 12651 for NEMO/releases/r4.0/r4.0-HEAD – NEMO

Ignore:
Timestamp:
2020-04-03T09:51:14+02:00 (4 years ago)
Author:
smasson
Message:

r4.0-HEAD: nstop>0 on a child grid is ok see #2433

Location:
NEMO/releases/r4.0/r4.0-HEAD/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/step.F90

    r12276 r12651  
    8181      !! --------------------------------------------------------------------- 
    8282#if defined key_agrif 
     83      IF( nstop > 0 ) return   ! avoid to go further if an error was detected during previous time step  
    8384      kstp = nit000 + Agrif_Nb_Step() 
    8485      IF( lk_agrif_debug ) THEN 
     
    280281#if defined key_agrif 
    281282      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    282       ! AGRIF 
     283      ! AGRIF recursive integration 
    283284      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    284285                         CALL Agrif_Integrate_ChildGrids( stp )  ! allows to finish all the Child Grids before updating 
    285  
    286                          IF( Agrif_NbStepint() == 0 ) CALL Agrif_update_all( ) ! Update all components 
    287 #endif 
    288       IF( ln_diaobs  )   CALL dia_obs      ( kstp )      ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    289  
     286#endif 
    290287      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    291288      ! Control 
     
    293290                         CALL stp_ctl      ( kstp, indic ) 
    294291                          
     292#if defined key_agrif 
     293      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     294      ! AGRIF update 
     295      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     296      IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) CALL Agrif_update_all( ) ! Update all components 
     297#endif 
     298 
     299      IF( ln_diaobs  )   CALL dia_obs      ( kstp )      ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
     300 
     301      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     302      ! File manipulation at the end of the first time step 
     303      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
    295304      IF( kstp == nit000 ) THEN                          ! 1st time step only 
    296305                                        CALL iom_close( numror )   ! close input  ocean restart file 
     
    306315      ! 
    307316#if defined key_iomput 
     317      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     318      ! Finalize contextes if end of simulation or error detected 
     319      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
    308320      IF( kstp == nitend .OR. indic < 0 ) THEN  
    309321                      CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    310                       IF(lrxios) CALL iom_context_finalize(      crxios_context          ) 
     322         IF( lrxios ) CALL iom_context_finalize(      crxios_context         ) 
    311323         IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) !  
    312324      ENDIF 
  • NEMO/releases/r4.0/r4.0-HEAD/src/SAS/step.F90

    r11536 r12651  
    7474 
    7575#if defined key_agrif 
     76      IF( nstop > 0 ) return   ! avoid to go further if an error was detected during previous time step  
    7677      kstp = nit000 + Agrif_Nb_Step() 
    7778      IF ( lk_agrif_debug ) THEN 
     
    104105#if defined key_agrif 
    105106      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    106       ! AGRIF 
     107      ! AGRIF recursive integration 
    107108      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    108109                             CALL Agrif_Integrate_ChildGrids( stp )   
    109  
    110       IF( Agrif_NbStepint() == 0 ) THEN               ! AGRIF Update from zoom N to zoom 1 then to Parent  
    111 #if defined key_si3 
    112                              CALL Agrif_Update_ice( )   ! update sea-ice 
    113 #endif 
    114       ENDIF 
    115 #endif 
    116                               
     110#endif                  
    117111      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    118112      ! Control 
     
    123117                             CALL dia_wri_state( 'output.abort' ) 
    124118      ENDIF 
    125       IF( kstp == nit000   ) CALL iom_close( numror )     ! close input  ocean restart file 
     119#if defined key_agrif 
     120      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     121      ! AGRIF update 
     122      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     123      IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) THEN                       ! AGRIF Update from zoom N to zoom 1 then to Parent  
     124#if defined key_si3 
     125                             CALL Agrif_Update_ice( )   ! update sea-ice 
     126#endif 
     127      ENDIF 
     128#endif 
     129      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     130      ! File manipulation at the end of the first time step 
     131      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
     132      IF( kstp == nit000   ) CALL iom_close( numror )                          ! close input  ocean restart file 
    126133       
    127134      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.