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

Ignore:
Timestamp:
2018-10-29T15:20:26+01:00 (5 years ago)
Author:
kingr
Message:

Rolled back to r10247 - i.e., undid merge of pkg br and 3.6_stable br

File:
1 edited

Legend:

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

    r10249 r10251  
    5050 
    5151#if defined key_agrif 
    52    RECURSIVE SUBROUTINE stp( ) 
     52   SUBROUTINE stp( ) 
    5353      INTEGER             ::   kstp   ! ocean time-step index 
    5454#else 
     
    7979#if defined key_agrif 
    8080      kstp = nit000 + Agrif_Nb_Step() 
    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  
     81!      IF ( Agrif_Root() .and. lwp) Write(*,*) '---' 
     82!      IF (lwp) Write(*,*) 'Grid Number',Agrif_Fixed(),' time step ',kstp 
    8683      IF ( kstp == (nit000 + 1) ) lk_agrif_fstep = .FALSE. 
    87  
    8884# if defined key_iomput 
    8985      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap( cxios_context ) 
     
    114110      ! Update stochastic parameters and random T/S fluctuations 
    115111      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    116        IF( ln_sto_eos ) CALL sto_par( kstp )          ! Stochastic parameters 
    117        IF( ln_sto_eos ) CALL sto_pts( tsn  )          ! Random T/S fluctuations 
     112                        CALL sto_par( kstp )          ! Stochastic parameters 
    118113 
    119114      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    157152      ! 
    158153      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
     154         IF(ln_sto_eos ) CALL sto_pts( tsn )          ! Random T/S fluctuations 
    159155                         CALL eos( tsb, rhd, gdept_0(:,:,:) )               ! before in situ density 
    160156         IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    192188          ! Note that the computation of vertical velocity above, hence "after" sea level 
    193189          ! 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 
    194191                            CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 
    195192            IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    203200                                  ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
    204201                                  va(:,:,:) = 0.e0 
    205           IF(  lk_asminc .AND. ln_asmiau .AND. & 
     202          IF(  ln_asmiau .AND. & 
    206203             & ln_dyninc       )  CALL dyn_asm_inc  ( kstp )   ! apply dynamics assimilation increment 
    207204          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! subtract Neptune velocities (simplified) 
     
    225222      ENDIF 
    226223 
    227       ! Cool skin 
    228       IF ( ln_diurnal ) THEN   
    229          IF ( ln_blk_core ) THEN 
    230             CALL diurnal_sst_coolskin_step( &   
    231                     qns(:,:)+(rn_abs*qsr(:,:)), taum, rhop(:,:,1), rdt)  
    232          ELSE 
    233             CALL diurnal_sst_coolskin_step( &   
    234                     qns, taum, rhop(:,:,1), rdt)  
    235          ENDIF 
    236       ENDIF 
    237  
    238224      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    239225      ! diagnostics and outputs             (ua, va, tsa used as workspace) 
     
    249235      IF( ln_crs     )      CALL crs_fld( kstp )         ! ocean model: online field coarsening & output 
    250236 
    251       !Diurnal warm layer model         
    252       IF ( ln_diurnal ) THEN 
    253          IF ( ln_blk_core ) THEN 
    254             IF( kstp == nit000 )THEN   
    255                CALL diurnal_sst_takaya_step( &   
    256                &    qsr(:,:)-(rn_abs*qsr(:,:)), qns(:,:)+(rn_abs*qsr(:,:)), & 
    257                &    taum, rhop(:,:,1), & 
    258                &    rdt, ld_calcfrac = .TRUE.)   
    259             ELSE   
    260                CALL diurnal_sst_takaya_step( &   
    261                &    qsr(:,:)-(rn_abs*qsr(:,:)), qns(:,:)+(rn_abs*qsr(:,:)), & 
    262                &    taum, rhop(:,:,1), rdt )   
    263             ENDIF  
    264          ELSE 
    265             IF( kstp == nit000 )THEN   
    266                CALL diurnal_sst_takaya_step( &   
    267                &    qsr, qns, taum, rhop(:,:,1), & 
    268                &    rdt, ld_calcfrac = .TRUE.)   
    269             ELSE   
    270                CALL diurnal_sst_takaya_step( &   
    271                &    qsr, qns, taum, rhop(:,:,1), rdt )   
    272             ENDIF  
    273          ENDIF 
    274       ENDIF 
    275  
    276237#if defined key_top 
    277238      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    287248                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero 
    288249 
    289       IF(  lk_asminc .AND. ln_asmiau .AND. & 
     250      IF(  ln_asmiau .AND. & 
    290251         & ln_trainc     )   CALL tra_asm_inc( kstp )       ! apply tracer assimilation increment 
    291252                             CALL tra_sbc    ( kstp )       ! surface boundary condition 
    292253      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr 
    293       IF( ln_tradwl      )   CALL tra_dwl    ( kstp )       ! Polcoms Style Short Wave Radiation  
    294254      IF( ln_trabbc      )   CALL tra_bbc    ( kstp )       ! bottom heat flux 
    295255      IF( lk_trabbl      )   CALL tra_bbl    ( kstp )       ! advective (and/or diffusive) bottom boundary layer scheme 
     
    310270         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    311271                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
     272            IF( ln_sto_eos ) CALL sto_pts( tsn )                 ! Random T/S fluctuations 
    312273                             CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation 
    313274            IF( ln_zps .AND. .NOT. ln_isfcav)                                & 
     
    320281      ELSE                                                  ! centered hpg  (eos then time stepping) 
    321282         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 
    322284                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
    323285         IF( ln_zps .AND. .NOT. ln_isfcav)                                   & 
     
    336298      ! Dynamics                                    (tsa used as workspace) 
    337299      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    338  
    339       IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields 
    340  
    341300      IF( lk_dynspg_ts   )  THEN 
    342301                                                             ! revert to previously computed momentum tendencies 
     
    355314                               va(:,:,:) = 0.e0 
    356315 
    357         IF(  lk_asminc .AND. ln_asmiau .AND. & 
     316        IF(  ln_asmiau .AND. & 
    358317           & ln_dyninc      )  CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
     318        IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields 
    359319        IF( ln_neptsimp )      CALL dyn_nept_cor( kstp )    ! subtract Neptune velocities (simplified) 
    360320        IF( lk_bdy          )  CALL bdy_dyn3d_dmp(kstp )    ! bdy damping trends 
     
    376336      IF( lk_vvl           )   CALL dom_vvl_sf_swp( kstp )  ! swap of vertical scale factors 
    377337 
    378 #if defined key_agrif 
    379       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    380       ! AGRIF 
    381       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    382                                CALL Agrif_Integrate_ChildGrids( stp )   
    383  
    384       IF ( Agrif_NbStepint().EQ.0 ) THEN 
    385                                CALL Agrif_Update_Tra()      ! Update active tracers 
    386                                CALL Agrif_Update_Dyn()      ! Update momentum 
    387       ENDIF 
    388 #endif 
    389338      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    390339      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    391340 
    392341      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    393       ! Control 
     342      ! Control and restarts 
    394343      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    395344                               CALL stp_ctl( kstp, indic ) 
     
    398347                               CALL dia_wri_state( 'output.abort', kstp ) 
    399348      ENDIF 
    400       IF( ln_harm_ana_store   )   CALL harm_ana( kstp )        ! Harmonic analysis of tides  
    401349      IF( kstp == nit000   )   THEN 
    402350                 CALL iom_close( numror )     ! close input  ocean restart file 
     
    419367      ! 
    420368      IF( nn_timing == 1 .AND.  kstp == nit000  )   CALL timing_reset 
    421       !      
    422369      ! 
    423370   END SUBROUTINE stp 
Note: See TracChangeset for help on using the changeset viewer.