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 12955 for NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/OCE/step.F90 – NEMO

Ignore:
Timestamp:
2020-05-20T16:08:51+02:00 (4 years ago)
Author:
smasson
Message:

Clem's branch: merge with trunk@12926

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/OCE/step.F90

    r12651 r12955  
    7676      !!---------------------------------------------------------------------- 
    7777      INTEGER ::   ji, jj, jk   ! dummy loop indice 
    78       INTEGER ::   indic        ! error indicator if < 0 
    7978!!gm kcall can be removed, I guess 
    8079      INTEGER ::   kcall        ! optional integer argument (dom_vvl_sf_nxt) 
    8180      !! --------------------------------------------------------------------- 
    8281#if defined key_agrif 
    83       IF( nstop > 0 ) return   ! avoid to go further if an error was detected during previous time step  
     82      IF( nstop > 0 ) RETURN   ! avoid to go further if an error was detected during previous time step (child grid) 
    8483      kstp = nit000 + Agrif_Nb_Step() 
    8584      IF( lk_agrif_debug ) THEN 
     
    9897      ! update I/O and calendar  
    9998      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    100                              indic = 0                ! reset to no error condition 
    101                               
    10299      IF( kstp == nit000 ) THEN                       ! initialize IOM context (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    103100                             CALL iom_init(      cxios_context          )  ! for model grid (including passible AGRIF zoom) 
     
    288285      ! Control 
    289286      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    290                          CALL stp_ctl      ( kstp, indic ) 
     287                         CALL stp_ctl      ( kstp ) 
    291288                          
    292289#if defined key_agrif 
     
    294291      ! AGRIF update 
    295292      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    296       IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) CALL Agrif_update_all( ) ! Update all components 
     293      IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) THEN 
     294                         CALL Agrif_update_all( )                  ! Update all components 
     295      ENDIF 
    297296#endif 
    298297 
     
    312311      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    313312!!gm why lk_oasis and not lk_cpl ???? 
    314       IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
     313      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
    315314      ! 
    316315#if defined key_iomput 
     
    318317      ! Finalize contextes if end of simulation or error detected 
    319318      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
    320       IF( kstp == nitend .OR. indic < 0 ) THEN  
    321                       CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
     319      IF( kstp == nitend .OR. nstop > 0 ) THEN  
     320                      CALL iom_context_finalize(       cxios_context         ) ! needed for XIOS+AGRIF 
    322321         IF( lrxios ) CALL iom_context_finalize(      crxios_context         ) 
    323322         IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) !  
     
    328327      ! 
    329328   END SUBROUTINE stp 
    330     
     329   ! 
    331330   !!====================================================================== 
    332331END MODULE step 
Note: See TracChangeset for help on using the changeset viewer.