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 6487 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2016-04-20T11:33:10+02:00 (8 years ago)
Author:
davestorkey
Message:

Changes from nemo_v3_6_STABLE_copy branch.
Custom merge into /branches/UKMO/dev_r5518_GO6_package/NEMOGCM: r6237 cf. r5781 of /branches/UKMO/nemo_v3_6_STABLE_copy/NEMOGCM@6486

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/step.F90

    r6486 r6487  
    5050 
    5151#if defined key_agrif 
    52    SUBROUTINE stp( ) 
     52   RECURSIVE SUBROUTINE stp( ) 
    5353      INTEGER             ::   kstp   ! ocean time-step index 
    5454#else 
     
    7979#if defined key_agrif 
    8080      kstp = nit000 + Agrif_Nb_Step() 
    81 !      IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
    82 !      IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 
     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() 
     84      ENDIF 
     85 
    8386      IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 
     87 
    8488# if defined key_iomput 
    8589      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
     
    110114      ! Update stochastic parameters and random T/S fluctuations 
    111115      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    112                         CALL sto_par( kstp )          ! Stochastic parameters 
     116       IF( ln_sto_eos ) CALL sto_par( kstp )          ! Stochastic parameters 
     117       IF( ln_sto_eos ) CALL sto_pts( tsn  )          ! Random T/S fluctuations 
    113118 
    114119      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    152157      ! 
    153158      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
    154          IF(ln_sto_eos ) CALL sto_pts( tsn )          ! Random T/S fluctuations 
    155159                         CALL eos( tsb, rhd, gdept_0(:,:,:) )               ! before in situ density 
    156160         IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    188192          ! Note that the computation of vertical velocity above, hence "after" sea level 
    189193          ! is necessary to compute momentum advection for the rhs of barotropic loop: 
    190             IF(ln_sto_eos ) CALL sto_pts( tsn )                             ! Random T/S fluctuations 
    191194                            CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 
    192195            IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    200203                                  ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
    201204                                  va(:,:,:) = 0.e0 
    202           IF(  ln_asmiau .AND. & 
     205          IF(  lk_asminc .AND. ln_asmiau .AND. & 
    203206             & ln_dyninc       )  CALL dyn_asm_inc  ( kstp )   ! apply dynamics assimilation increment 
    204207          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! subtract Neptune velocities (simplified) 
     
    248251                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero 
    249252 
    250       IF(  ln_asmiau .AND. & 
     253      IF(  lk_asminc .AND. ln_asmiau .AND. & 
    251254         & ln_trainc     )   CALL tra_asm_inc( kstp )       ! apply tracer assimilation increment 
    252255                             CALL tra_sbc    ( kstp )       ! surface boundary condition 
     
    270273         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    271274                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
    272             IF( ln_sto_eos ) CALL sto_pts( tsn )                 ! Random T/S fluctuations 
    273275                             CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation 
    274276            IF( ln_zps .AND. .NOT. ln_isfcav)                                & 
     
    281283      ELSE                                                  ! centered hpg  (eos then time stepping) 
    282284         IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case 
    283             IF( ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations 
    284285                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
    285286         IF( ln_zps .AND. .NOT. ln_isfcav)                                   & 
     
    314315                               va(:,:,:) = 0.e0 
    315316 
    316         IF(  ln_asmiau .AND. & 
     317        IF(  lk_asminc .AND. ln_asmiau .AND. & 
    317318           & ln_dyninc      )  CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
    318319        IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields 
     
    335336                               CALL ssh_swp( kstp )         ! swap of sea surface height 
    336337      IF( lk_vvl           )   CALL dom_vvl_sf_swp( kstp )  ! swap of vertical scale factors 
    337  
     338      ! 
     339      IF( lrst_oce         )   CALL rst_write( kstp )       ! write output ocean restart file 
     340 
     341#if defined key_agrif 
     342      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     343      ! AGRIF 
     344      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
     345                               CALL Agrif_Integrate_ChildGrids( stp )   
     346 
     347      IF ( Agrif_NbStepint().EQ.0 ) THEN 
     348                               CALL Agrif_Update_Tra()      ! Update active tracers 
     349                               CALL Agrif_Update_Dyn()      ! Update momentum 
     350      ENDIF 
     351#endif 
    338352      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    339353      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    340354 
    341355      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    342       ! Control and restarts 
     356      ! Control 
    343357      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    344358                               CALL stp_ctl( kstp, indic ) 
     
    352366         IF( lwm.AND.numoni /= -1 ) CALL FLUSH    ( numoni )     ! flush output namelist ice 
    353367      ENDIF 
    354       IF( lrst_oce         )   CALL rst_write    ( kstp )   ! write output ocean restart file 
    355368 
    356369      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    367380      ! 
    368381      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset 
     382      !      
    369383      ! 
    370384   END SUBROUTINE stp 
Note: See TracChangeset for help on using the changeset viewer.