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 12958 for NEMO/branches/UKMO/dev_r12745_HPC-02_Daley_Tiling_trial_public/src/SAS/step.F90 – NEMO

Ignore:
Timestamp:
2020-05-21T17:14:32+02:00 (4 years ago)
Author:
hadcv
Message:

Merge in trunk changes to r12933

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r12745_HPC-02_Daley_Tiling_trial_public/src/SAS/step.F90

    r12650 r12958  
    7474      !!              -2- Outputs and diagnostics 
    7575      !!---------------------------------------------------------------------- 
    76       INTEGER ::   indic    ! error indicator if < 0 
    77       !! --------------------------------------------------------------------- 
    7876 
    7977#if defined key_agrif 
    80       IF( nstop > 0 ) return   ! avoid to go further if an error was detected during previous time step  
     78      IF( nstop > 0 ) RETURN   ! avoid to go further if an error was detected during previous time step (child grid) 
    8179      kstp = nit000 + Agrif_Nb_Step() 
    8280      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
    83       IF ( lk_agrif_debug ) THEN 
    84          IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
    85          IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp, 'int tstep',Agrif_NbStepint() 
     81      IF( lk_agrif_debug ) THEN 
     82         IF( Agrif_Root() .and. lwp)   WRITE(*,*) '---' 
     83         IF(lwp)   WRITE(*,*) 'Grid Number', Agrif_Fixed(),' time step ', kstp, 'int tstep', Agrif_NbStepint() 
    8684      ENDIF 
    87  
    88       IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 
    89  
     85      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    9086# if defined key_iomput 
    9187      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    9288# endif    
    9389#endif    
    94                              indic = 0                    ! although indic is not changed in stp_ctl 
    95                                                           ! need to keep the same interface  
    9690      IF( kstp == nit000 )   CALL iom_init( cxios_context ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    9791      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init) 
     
    112106      ! AGRIF recursive integration 
    113107      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    114                              CALL Agrif_Integrate_ChildGrids( stp )   
    115 #endif 
     108                             CALL Agrif_Integrate_ChildGrids( stp ) 
    116109                              
     110#endif                              
    117111      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    118112      ! Control 
    119113      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    120                              CALL stp_ctl( kstp, indic ) 
    121       IF( indic < 0  )  THEN 
    122                              CALL ctl_stop( 'step: indic < 0' ) 
    123                              CALL dia_wri_state( Nnn, 'output.abort' ) 
    124       ENDIF 
     114                             CALL stp_ctl( kstp, Nnn ) 
     115 
    125116#if defined key_agrif 
    126117      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    132123#endif 
    133124      ENDIF 
     125 
    134126#endif 
    135127      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    141133      ! Coupled mode 
    142134      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    143       IF( lk_oasis    )  CALL sbc_cpl_snd( kstp, Nbb, Nnn )     ! coupled mode : field exchanges if OASIS-coupled ice 
     135      IF( lk_oasis .AND. nstop == 0 ) CALL sbc_cpl_snd( kstp, Nbb, Nnn )       ! coupled mode : field exchanges if OASIS-coupled ice 
    144136 
    145137#if defined key_iomput 
     
    152144         lrst_oce = .FALSE. 
    153145      ENDIF 
    154       IF( kstp == nitend .OR. indic < 0 ) THEN 
    155                              CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 
     146      IF( kstp == nitend .OR. nstop > 0 ) THEN 
     147         CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 
    156148      ENDIF 
    157149#endif 
Note: See TracChangeset for help on using the changeset viewer.