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 7256 for branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2016-11-18T08:18:45+01:00 (7 years ago)
Author:
cbricaud
Message:

phaze NEMO routines in CRS branch with nemo_v3_6_STABLE branch at rev 7213 (09-09-2016) (merge -r 5519:7213 )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5003_MERCATOR6_CRS/NEMOGCM/NEMO/OPA_SRC/step.F90

    r7217 r7256  
    5151 
    5252#if defined key_agrif 
    53    SUBROUTINE stp( ) 
     53   RECURSIVE SUBROUTINE stp( ) 
    5454      INTEGER             ::   kstp   ! ocean time-step index 
    5555#else 
     
    8282#if defined key_agrif 
    8383      kstp = nit000 + Agrif_Nb_Step() 
    84 !      IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
    85 !      IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 
     84      IF ( lk_agrif_debug ) THEN 
     85         IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
     86         IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp, 'int tstep',Agrif_NbStepint() 
     87      ENDIF 
     88 
    8689      IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 
     90 
    8791# if defined key_iomput 
    8892      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
     
    113117      ! Update stochastic parameters and random T/S fluctuations 
    114118      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    115                         CALL sto_par( kstp )          ! Stochastic parameters 
     119       IF( ln_sto_eos ) CALL sto_par( kstp )          ! Stochastic parameters 
     120       IF( ln_sto_eos ) CALL sto_pts( tsn  )          ! Random T/S fluctuations 
    116121 
    117122      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    155160      ! 
    156161      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
    157          IF(ln_sto_eos ) CALL sto_pts( tsn )          ! Random T/S fluctuations 
    158162                         CALL eos( tsb, rhd, gdept_0(:,:,:) )               ! before in situ density 
    159163         IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    191195          ! Note that the computation of vertical velocity above, hence "after" sea level 
    192196          ! is necessary to compute momentum advection for the rhs of barotropic loop: 
    193             IF(ln_sto_eos ) CALL sto_pts( tsn )                             ! Random T/S fluctuations 
    194197                            CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 
    195198            IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    203206                                  ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
    204207                                  va(:,:,:) = 0.e0 
    205           IF(  ln_asmiau .AND. & 
     208          IF(  lk_asminc .AND. ln_asmiau .AND. & 
    206209             & ln_dyninc       )  CALL dyn_asm_inc  ( kstp )   ! apply dynamics assimilation increment 
    207210          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! subtract Neptune velocities (simplified) 
     
    277280                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero 
    278281 
    279       IF(  ln_asmiau .AND. & 
     282      IF(  lk_asminc .AND. ln_asmiau .AND. & 
    280283         & ln_trainc     )   CALL tra_asm_inc( kstp )       ! apply tracer assimilation increment 
    281284                             CALL tra_sbc    ( kstp )       ! surface boundary condition 
     
    299302         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    300303                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
    301             IF( ln_sto_eos ) CALL sto_pts( tsn )                 ! Random T/S fluctuations 
    302304                             CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation 
    303305            IF( ln_zps .AND. .NOT. ln_isfcav)                                & 
     
    310312      ELSE                                                  ! centered hpg  (eos then time stepping) 
    311313         IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case 
    312             IF( ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations 
    313314                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
    314315         IF( ln_zps .AND. .NOT. ln_isfcav)                                   & 
     
    343344                               va(:,:,:) = 0.e0 
    344345 
    345         IF(  ln_asmiau .AND. & 
     346        IF(  lk_asminc .AND. ln_asmiau .AND. & 
    346347           & ln_dyninc      )  CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
    347348        IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields 
     
    364365                               CALL ssh_swp( kstp )         ! swap of sea surface height 
    365366      IF( lk_vvl           )   CALL dom_vvl_sf_swp( kstp )  ! swap of vertical scale factors 
    366  
     367      ! 
    367368      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    368       IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    369  
    370       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    371       ! Control and restarts 
     369 
     370      IF( lrst_oce         )   CALL rst_write( kstp )       ! write output ocean restart file 
     371      IF( ln_sto_eos       )   CALL sto_rst_write( kstp )   ! write restart file for stochastic parameters 
     372 
     373#if defined key_agrif 
     374      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     375      ! AGRIF 
     376      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     377                               CALL Agrif_Integrate_ChildGrids( stp )   
     378 
     379      IF ( Agrif_NbStepint().EQ.0 ) THEN 
     380                               CALL Agrif_Update_Tra()      ! Update active tracers 
     381                               CALL Agrif_Update_Dyn()      ! Update momentum 
     382      ENDIF 
     383#endif 
     384      IF( lk_diaobs        )   CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
     385 
     386      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     387      ! Control 
    372388      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    373389                               CALL stp_ctl( kstp, indic ) 
     
    381397         IF( lwm.AND.numoni /= -1 ) CALL FLUSH    ( numoni )     ! flush output namelist ice 
    382398      ENDIF 
    383       IF( lrst_oce         )   CALL rst_write    ( kstp )   ! write output ocean restart file 
    384399 
    385400      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    396411      ! 
    397412      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset 
     413      !      
    398414      ! 
    399415   END SUBROUTINE stp 
Note: See TracChangeset for help on using the changeset viewer.