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 4978 for branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/NEMO/OPA_SRC – NEMO

Ignore:
Timestamp:
2014-12-08T17:03:48+01:00 (10 years ago)
Author:
jchanut
Message:

Recursive update for active tracers and dynamics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/NEMO/OPA_SRC/step.F90

    r4954 r4978  
    7777#if defined key_agrif 
    7878      kstp = nit000 + Agrif_Nb_Step() 
    79       IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
    80       IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 
     79      IF ( lk_agrif_debug ) THEN 
     80         IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
     81         IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp, 'int tstep',Agrif_NbStepint() 
     82      ENDIF 
     83 
    8184      IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 
     85 
     86      IF ( Agrif_NbStepint() .EQ. (Agrif_irhot()-1)) THEN  
     87         lk_agrif_doupd = .TRUE. 
     88      ELSE 
     89         lk_agrif_doupd = .FALSE. 
     90      ENDIF 
     91 
    8292# if defined key_iomput 
    8393      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( "nemo" ) 
     
    298308                               CALL ssh_swp( kstp )         ! swap of sea surface height 
    299309      IF( lk_vvl           )   CALL dom_vvl_sf_swp( kstp )  ! swap of vertical scale factors 
    300  
    301 #if defined key_agrif 
    302       ! AGRIF update 
    303       IF (.NOT.Agrif_Root()) THEN 
    304                                CALL Agrif_Update_Tra( kstp )! Update active tracers 
    305                                CALL Agrif_Update_Dyn( kstp )! Update momentum 
    306       ENDIF 
    307 #endif 
    308310      ! 
    309311      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    310312      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
     313 
     314#if defined key_agrif 
     315      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     316      ! AGRIF update (TWO WAY) 
     317      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     318      IF ( Agrif_Level().EQ.Agrif_MaxLevel() ) THEN 
     319                               CALL Agrif_Update_Tra()      ! Update active tracers 
     320                               CALL Agrif_Update_Dyn()      ! Update momentum 
     321      ENDIF 
     322#endif 
    311323 
    312324      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    348360      ! 
    349361      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset 
    350       ! 
    351 #if defined key_agrif 
    352       CALL Agrif_Integrate_ChildGrids( stp )    
    353 #endif       
     362      !      
     363#if defined key_agrif 
     364                               CALL Agrif_Integrate_ChildGrids( stp )    
     365#endif 
    354366      ! 
    355367   END SUBROUTINE stp 
Note: See TracChangeset for help on using the changeset viewer.