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 13159 for NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/SAS/step.F90 – NEMO

Ignore:
Timestamp:
2020-06-26T10:26:32+02:00 (4 years ago)
Author:
gsamson
Message:

merge trunk@r13136 into ASINTER-06 branch; pass all SETTE tests; results identical to trunk@r13136; ticket #2419

Location:
NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@12931        sette 
  • NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/SAS/step.F90

    r12377 r13159  
    7474      !!              -2- Outputs and diagnostics 
    7575      !!---------------------------------------------------------------------- 
    76       INTEGER ::   indic    ! error indicator if < 0 
    77       !! --------------------------------------------------------------------- 
    7876 
    7977#if defined key_agrif 
     78      IF( nstop > 0 ) RETURN   ! avoid to go further if an error was detected during previous time step (child grid) 
    8079      kstp = nit000 + Agrif_Nb_Step() 
    8180      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
    82       IF ( lk_agrif_debug ) THEN 
    83          IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
    84          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() 
    8584      ENDIF 
    86  
    87       IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 
    88  
     85      IF( kstp == nit000 + 1 )   lk_agrif_fstep = .FALSE. 
    8986# if defined key_iomput 
    9087      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
    9188# endif    
    9289#endif    
    93                              indic = 0                    ! although indic is not changed in stp_ctl 
    94                                                           ! need to keep the same interface  
    9590      IF( kstp == nit000 )   CALL iom_init( cxios_context ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    9691      IF( kstp /= nit000 )   CALL day( kstp )             ! Calendar (day was already called at nit000 in day_init) 
     
    109104#if defined key_agrif 
    110105      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    111       ! AGRIF 
     106      ! AGRIF recursive integration 
    112107      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    113                              CALL Agrif_Integrate_ChildGrids( stp )   
     108                             CALL Agrif_Integrate_ChildGrids( stp ) 
     109                              
     110#endif                              
     111      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     112      ! Control 
     113      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     114                             CALL stp_ctl( kstp, Nnn ) 
    114115 
    115       IF( Agrif_NbStepint() == 0 ) THEN               ! AGRIF Update from zoom N to zoom 1 then to Parent  
     116#if defined key_agrif 
     117      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     118      ! AGRIF update 
     119      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     120      IF( Agrif_NbStepint() == 0 .AND. nstop == 0 ) THEN                       ! AGRIF Update from zoom N to zoom 1 then to Parent  
    116121#if defined key_si3 
    117122                             CALL Agrif_Update_ice( )   ! update sea-ice 
    118123#endif 
    119124      ENDIF 
     125 
    120126#endif 
    121                               
    122127      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    123       ! Control 
    124       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    125                              CALL stp_ctl( kstp, indic ) 
    126       IF( indic < 0  )  THEN 
    127                              CALL ctl_stop( 'step: indic < 0' ) 
    128                              CALL dia_wri_state( 'output.abort', Nnn ) 
    129       ENDIF 
    130       IF( kstp == nit000   ) CALL iom_close( numror )           ! close input  ocean restart file 
     128      ! File manipulation at the end of the first time step 
     129      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                          
     130      IF( kstp == nit000   ) CALL iom_close( numror )                          ! close input  ocean restart file 
    131131       
    132132      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    133133      ! Coupled mode 
    134134      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    135       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 
    136136 
    137137#if defined key_iomput 
     
    144144         lrst_oce = .FALSE. 
    145145      ENDIF 
    146       IF( kstp == nitend .OR. indic < 0 ) THEN 
    147                              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 
    148148      ENDIF 
    149149#endif 
Note: See TracChangeset for help on using the changeset viewer.