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 6225 for branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90 – NEMO

Ignore:
Timestamp:
2016-01-08T10:35:19+01:00 (8 years ago)
Author:
jamesharle
Message:

Update MPP_BDY_UPDATE branch to be consistent with head of trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90

    • Property svn:keywords set to Id
    r4313 r6225  
    1818#endif 
    1919   USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     ) 
    20    USE dynnxt_c1d      ! time-stepping                    (dyn_nxt routine) 
     20   USE dynnxt          ! time-stepping                    (dyn_nxt routine) 
    2121   USE dyndmp          ! U & V momentum damping           (dyn_dmp routine) 
    2222   USE restart         ! restart  
     
    2828 
    2929   !! * Substitutions 
    30 #  include "domzgr_substitute.h90" 
    3130#  include "zdfddm_substitute.h90" 
    3231   !!---------------------------------------------------------------------- 
    33    !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    34    !! $Id: step_c1d.F90 2382 2010-11-13 13:08:12Z gm $ 
     32   !! NEMO/C1D 3.7 , NEMO Consortium (2015) 
     33   !! $Id$ 
    3534   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3635   !!---------------------------------------------------------------------- 
     
    5554      !!---------------------------------------------------------------------- 
    5655      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index 
     56      ! 
    5757      INTEGER ::   jk       ! dummy loop indice 
    5858      INTEGER ::   indic    ! error indicator if < 0 
     
    7272      ! Ocean physics update                (ua, va, ta, sa used as workspace) 
    7373      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    74                          CALL bn2( tsb, rn2b )        ! before Brunt-Vaisala frequency 
    75                          CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency 
     74                         CALL eos_rab( tsb, rab_b )   ! before local thermal/haline expension ratio at T-points 
     75                         CALL eos_rab( tsn, rab_n )   ! now    local thermal/haline expension ratio at T-points 
     76                         CALL bn2( tsb, rab_b, rn2b ) ! before Brunt-Vaisala frequency 
     77                         CALL bn2( tsn, rab_n, rn2  ) ! now    Brunt-Vaisala frequency 
    7678      !  VERTICAL PHYSICS    
    7779                         CALL zdf_bfr( kstp )         ! bottom friction 
     
    8082      IF( lk_zdftke  )   CALL zdf_tke( kstp )            ! TKE closure scheme for Kz 
    8183      IF( lk_zdfgls  )   CALL zdf_gls( kstp )            ! GLS closure scheme for Kz 
    82       IF( lk_zdfkpp  )   CALL zdf_kpp( kstp )            ! KPP closure scheme for Kz 
    8384      IF( lk_zdfcst  )   THEN                            ! Constant Kz (reset avt, avm[uv] to the background value) 
    8485         avt (:,:,:) = rn_avt0 * tmask(:,:,:) 
     
    9192      ENDIF 
    9293      IF( ln_zdfevd  )   CALL zdf_evd( kstp )         ! enhanced vertical eddy diffusivity 
    93  
    9494      IF( lk_zdftmx  )   CALL zdf_tmx( kstp )         ! tidal vertical mixing 
    95  
    96       IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   & 
    97          &               CALL zdf_ddm( kstp )         ! double diffusive mixing 
    98           
     95      IF( lk_zdfddm  )   CALL zdf_ddm( kstp )         ! double diffusive mixing 
    9996                         CALL zdf_mxl( kstp )         ! mixed layer depth 
    10097 
     
    115112      ! Passive Tracer Model 
    116113      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    117                          CALL trc_stp( kstp )            ! time-stepping 
     114                        CALL trc_stp( kstp )       ! time-stepping 
    118115#endif 
    119116 
     
    121118      ! Active tracers                              (ua, va used as workspace) 
    122119      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    123                              tsa(:,:,:,:) = 0.e0                ! set tracer trends to zero 
     120                        tsa(:,:,:,:) = 0._wp       ! set tracer trends to zero 
    124121 
    125                              CALL tra_sbc    ( kstp )        ! surface boundary condition 
    126       IF( ln_traqsr      )   CALL tra_qsr    ( kstp )        ! penetrative solar radiation qsr 
    127       IF( ln_tradmp      )   CALL tra_dmp    ( kstp )        ! internal damping trends- tracers 
    128       IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes 
    129                              CALL tra_zdf    ( kstp )        ! vertical mixing 
    130                              CALL tra_nxt    ( kstp )        ! tracer fields at next time step 
    131       IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )        ! applied non penetrative convective adjustment on (t,s) 
    132                              CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )      ! now (swap=before) in situ density for dynhpg module 
     122                        CALL tra_sbc( kstp )       ! surface boundary condition 
     123      IF( ln_traqsr )   CALL tra_qsr( kstp )       ! penetrative solar radiation qsr 
     124      IF( ln_tradmp )   CALL tra_dmp( kstp )       ! internal damping trends- tracers 
     125                        CALL tra_zdf( kstp )       ! vertical mixing 
     126                        CALL eos( tsn, rhd, rhop, gdept_0(:,:,:) )   ! now potential density for zdfmxl 
     127      IF( ln_zdfnpc )   CALL tra_npc( kstp )       ! applied non penetrative convective adjustment on (t,s) 
     128                        CALL tra_nxt( kstp )       ! tracer fields at next time step 
     129 
     130 
    133131 
    134132      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    135133      ! Dynamics                                    (ta, sa used as workspace) 
    136134      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    137                                ua(:,:,:) = 0.e0               ! set dynamics trends to zero 
    138                                va(:,:,:) = 0.e0 
     135                        ua(:,:,:) = 0._wp          ! set dynamics trends to zero 
     136                        va(:,:,:) = 0._wp 
    139137 
    140       IF( ln_dyndmp      )     CALL dyn_dmp    ( kstp )       ! internal damping trends- momentum 
    141                                CALL dyn_cor_c1d( kstp )       ! vorticity term including Coriolis 
    142                                CALL dyn_zdf    ( kstp )       ! vertical diffusion 
    143                                CALL dyn_nxt_c1d( kstp )       ! lateral velocity at next time step 
     138      IF( ln_dyndmp )   CALL dyn_dmp    ( kstp )   ! internal damping trends- momentum 
     139                        CALL dyn_cor_c1d( kstp )   ! vorticity term including Coriolis 
     140                        CALL dyn_zdf    ( kstp )   ! vertical diffusion 
     141                        CALL dyn_nxt    ( kstp )   ! lateral velocity at next time step 
    144142 
    145143      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    146144      ! Control and restarts 
    147145      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    148                                  CALL stp_ctl( kstp, indic ) 
    149       IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file 
    150       IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file 
     146                             CALL stp_ctl( kstp, indic ) 
     147      IF( kstp == nit000 )   CALL iom_close( numror )      ! close input  ocean restart file 
     148      IF( lrst_oce       )   CALL rst_write( kstp )        ! write output ocean restart file 
    151149      ! 
     150#if defined key_iomput 
     151      IF( kstp == nitend .OR. indic < 0 )   CALL xios_context_finalize()   ! needed for XIOS 
     152      ! 
     153#endif 
    152154   END SUBROUTINE stp_c1d 
    153155 
Note: See TracChangeset for help on using the changeset viewer.