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 12650 for NEMO/trunk/src/OCE/step.F90 – NEMO

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

trunk: nstop>0 on a child grid is ok, see #2420

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/step.F90

    r12489 r12650  
    8787      !! --------------------------------------------------------------------- 
    8888#if defined key_agrif 
     89      IF( nstop > 0 ) return   ! avoid to go further if an error was detected during previous time step  
    8990      kstp = nit000 + Agrif_Nb_Step() 
    9091      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
     
    309310#if defined key_agrif 
    310311      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    311       ! AGRIF 
     312      ! AGRIF recursive integration 
    312313      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    313314                         Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs      ! agrif_oce module copies of time level indices 
    314315                         CALL Agrif_Integrate_ChildGrids( stp )       ! allows to finish all the Child Grids before updating 
    315  
    316                          IF( Agrif_NbStepint() == 0 ) THEN 
    317                             CALL Agrif_update_all( )                  ! Update all components 
    318                          ENDIF 
     316#endif 
     317      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     318      ! Control 
     319      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     320                         CALL stp_ctl      ( kstp, Nbb, Nnn, indic ) 
     321#if defined key_agrif 
     322      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     323      ! AGRIF update 
     324      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     325      IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) THEN 
     326                         CALL Agrif_update_all( )                  ! Update all components 
     327      ENDIF 
    319328#endif 
    320329      IF( ln_diaobs  )   CALL dia_obs      ( kstp, Nnn )      ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    321330 
    322331      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    323       ! Control 
    324       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    325                          CALL stp_ctl      ( kstp, Nbb, Nnn, indic ) 
    326                           
     332      ! File manipulation at the end of the first time step 
     333      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
    327334      IF( kstp == nit000 ) THEN                          ! 1st time step only 
    328335                                        CALL iom_close( numror )   ! close input  ocean restart file 
     
    338345      ! 
    339346#if defined key_iomput 
     347      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     348      ! Finalize contextes if end of simulation or error detected 
     349      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
    340350      IF( kstp == nitend .OR. indic < 0 ) THEN  
    341351                      CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    342                       IF(lrxios) CALL iom_context_finalize(      crxios_context          ) 
     352         IF( lrxios ) CALL iom_context_finalize(      crxios_context         ) 
    343353         IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) !  
    344354      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.