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

Ignore:
Timestamp:
2020-05-15T10:06:25+02:00 (4 years ago)
Author:
smasson
Message:

trunk: merge back r12581_ticket2418 branch into the trunk, see #2418

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@12798        sette 
         10^/utils/CI/sette@12931        sette 
  • NEMO/trunk/src/OCE/step.F90

    r12650 r12933  
    8282      !!---------------------------------------------------------------------- 
    8383      INTEGER ::   ji, jj, jk   ! dummy loop indice 
    84       INTEGER ::   indic        ! error indicator if < 0 
    8584!!gm kcall can be removed, I guess 
    8685      INTEGER ::   kcall        ! optional integer argument (dom_vvl_sf_nxt) 
    8786      !! --------------------------------------------------------------------- 
    8887#if defined key_agrif 
    89       IF( nstop > 0 ) return   ! avoid to go further if an error was detected during previous time step  
     88      IF( nstop > 0 ) RETURN   ! avoid to go further if an error was detected during previous time step (child grid) 
    9089      kstp = nit000 + Agrif_Nb_Step() 
    9190      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
     
    115114      ! update I/O and calendar  
    116115      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    117                              indic = 0                ! reset to no error condition 
    118                               
    119116      IF( kstp == nit000 ) THEN                       ! initialize IOM context (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    120                              CALL iom_init( cxios_context, ld_closedef=.FALSE. )   ! for model grid (including passible AGRIF zoom) 
     117                             CALL iom_init( cxios_context, ld_closedef=.FALSE. )   ! for model grid (including possible AGRIF zoom) 
    121118         IF( lk_diamlr   )   CALL dia_mlr_iom_init    ! with additional setup for multiple-linear-regression analysis 
    122119                             CALL iom_init_closedef 
     
    314311                         Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs      ! agrif_oce module copies of time level indices 
    315312                         CALL Agrif_Integrate_ChildGrids( stp )       ! allows to finish all the Child Grids before updating 
     313 
    316314#endif 
    317315      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    318316      ! Control 
    319317      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    320                          CALL stp_ctl      ( kstp, Nbb, Nnn, indic ) 
     318                         CALL stp_ctl      ( kstp, Nnn ) 
     319 
    321320#if defined key_agrif 
    322321      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    326325                         CALL Agrif_update_all( )                  ! Update all components 
    327326      ENDIF 
    328 #endif 
    329       IF( ln_diaobs  )   CALL dia_obs      ( kstp, Nnn )      ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
     327 
     328#endif 
     329      IF( ln_diaobs .AND. nstop == 0 )  CALL dia_obs( kstp, Nnn )  ! obs-minus-model (assimilation) diags (after dynamics update) 
    330330 
    331331      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    341341      ! Coupled mode 
    342342      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    343 !!gm why lk_oasis and not lk_cpl ???? 
    344       IF( lk_oasis   )   CALL sbc_cpl_snd( kstp, Nbb, Nnn )        ! coupled mode : field exchanges 
     343      IF( lk_oasis .AND. nstop == 0 )   CALL sbc_cpl_snd( kstp, Nbb, Nnn )     ! coupled mode : field exchanges 
    345344      ! 
    346345#if defined key_iomput 
     
    348347      ! Finalize contextes if end of simulation or error detected 
    349348      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
    350       IF( kstp == nitend .OR. indic < 0 ) THEN  
     349      IF( kstp == nitend .OR. nstop > 0 ) THEN  
    351350                      CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    352351         IF( lrxios ) CALL iom_context_finalize(      crxios_context         ) 
Note: See TracChangeset for help on using the changeset viewer.