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 1438 for trunk/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2009-05-11T16:34:47+02:00 (15 years ago)
Author:
rblod
Message:

Merge VVL branch with the trunk (act II), see ticket #429

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/step.F90

    r1417 r1438  
    44   !! Time-stepping    : manager of the ocean, tracer and ice time stepping 
    55   !!====================================================================== 
    6    !! History :        !  91-03  (G. Madec)  Original code 
    7    !!                  !  92-06  (M. Imbard)  add a first output record 
    8    !!                  !  96-04  (G. Madec)  introduction of dynspg 
    9    !!                  !  96-04  (M.A. Foujols)  introduction of passive tracer 
    10    !!             8.0  !  97-06  (G. Madec)  new architecture of call 
    11    !!             8.2  !  97-06  (G. Madec, M. Imbard, G. Roullet)  free surface 
    12    !!             8.2  !  99-02  (G. Madec, N. Grima)  hpg implicit 
    13    !!             8.2  !  00-07  (J-M Molines, M. Imbard)  Open Bondary Conditions 
    14    !!             9.0  !  02-06  (G. Madec)  free form, suppress macro-tasking 
    15    !!             " "  !  04-08  (C. Talandier) New trends organization 
    16    !!             " "  !  05-01  (C. Ethe) Add the KPP closure scheme 
    17    !!             " "  !  05-11  (V. Garnier) Surface pressure gradient organization 
    18    !!             " "  !  05-11  (G. Madec)  Reorganisation of tra and dyn calls 
    19    !!             " "  !  06-01  (L. Debreu, C. Mazauric)  Agrif implementation 
    20    !!             " "  !  06-07  (S. Masson)  restart using iom 
    21    !!             " "  !  06-08  (G. Madec)  surface module  
    22    !!             " "  !  07-07  (J. Chanut, A. Sellar) Unstructured open boundaries (BDY) 
     6   !! History :  OPA  !  1991-03  (G. Madec)  Original code 
     7   !!                 !  1991-11  (G. Madec) 
     8   !!                 !  1992-06  (M. Imbard)  add a first output record 
     9   !!                 !  1996-04  (G. Madec)  introduction of dynspg 
     10   !!                 !  1996-04  (M.A. Foujols)  introduction of passive tracer 
     11   !!            8.0  !  1997-06  (G. Madec)  new architecture of call 
     12   !!            8.2  !  1997-06  (G. Madec, M. Imbard, G. Roullet)  free surface 
     13   !!             -   !  1999-02  (G. Madec, N. Grima)  hpg implicit 
     14   !!             -   !  2000-07  (J-M Molines, M. Imbard)  Open Bondary Conditions 
     15   !!   NEMO     1.0  !  2002-06  (G. Madec)  free form, suppress macro-tasking 
     16   !!             -   !  2004-08  (C. Talandier) New trends organization 
     17   !!                 !  2005-01  (C. Ethe) Add the KPP closure scheme 
     18   !!                 !  2005-11  (G. Madec)  Reorganisation of tra and dyn calls 
     19   !!                 !  2006-01  (L. Debreu, C. Mazauric)  Agrif implementation 
     20   !!                 !  2006-07  (S. Masson)  restart using iom 
     21   !!            3.2  !  2009-02  (G. Madec, R. Benshila)  reintroduicing z*-coordinate 
    2322   !!---------------------------------------------------------------------- 
    2423 
     
    117116   USE restart         ! ocean restart                    (rst_wri routine) 
    118117   USE prtctl          ! Print control                    (prt_ctl routine) 
    119    USE domvvl          ! variable volume                  (dom_vvl routine) 
    120118 
    121119#if defined key_agrif 
     
    141139#if defined key_agrif 
    142140   SUBROUTINE stp( ) 
     141      INTEGER             ::   kstp   ! ocean time-step index 
    143142#else 
    144143   SUBROUTINE stp( kstp ) 
     144      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index 
    145145#endif 
    146146      !!---------------------------------------------------------------------- 
     
    160160      !!              -8- Outputs and diagnostics 
    161161      !!---------------------------------------------------------------------- 
    162       !! * Arguments 
    163 #if defined key_agrif    
    164       INTEGER             ::   kstp   ! ocean time-step index 
    165 #else 
    166       INTEGER, INTENT(in) ::   kstp   ! ocean time-step index 
    167 #endif       
    168162      INTEGER ::   jk       ! dummy loop indice 
    169163      INTEGER ::   indic    ! error indicator if < 0 
     
    202196      ENDIF 
    203197 
     198      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     199      !                Ocean dynamics : ssh, wn, hdiv, rot                   ! 
     200      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     201                       CALL div_cur( kstp )                 ! Horizontal divergence & Relative vorticity 
     202      IF( n_cla == 1 ) CALL div_cla( kstp )                 ! Cross Land Advection (Update Hor. divergence) 
     203                       CALL ssh_wzv( kstp )                 ! after ssh & vertical velocity 
    204204 
    205205      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    206206      ! Ocean physics update 
    207207      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     208      ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
     209      !----------------------------------------------------------------------- 
     210      IF( neuler == 0 .AND. kstp == nit000 ) THEN 
     211                        CALL bn2( tn, sn, rn2 )              ! now    Brunt-Vaisala frequency 
     212                        rn2b(:,:,:) = rn2(:,:,:) 
     213      ELSE 
     214                        rn2b(:,:,:) = rn2(:,:,:)             ! before Brunt-Vaisala frequency   
     215                        CALL bn2( tn, sn, rn2 )              ! now    Brunt-Vaisala frequency 
     216      ENDIF 
     217 
    208218#if defined key_zdftke2 
    209219      IF ( ln_dynhpg_imp ) THEN 
     
    211221      !  LATERAL PHYSICS 
    212222      !----------------------------------------------------------------------- 
    213       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    214       !----------------------------------------------------------------------- 
    215223                               CALL zdf_mxl( kstp )                 ! mixed layer depth 
    216          IF( lk_ldfslp     )   CALL ldf_slp( kstp, rhd, rn2 )       ! before slope of the lateral mixing 
     224         IF( lk_ldfslp     )   CALL ldf_slp( kstp, rhd, rn2b )      ! before slope of the lateral mixing 
    217225#  if defined key_traldf_c2d 
    218226         IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )                 ! eddy induced velocity coefficient 
     
    223231      !  VERTICAL PHYSICS 
    224232      !----------------------------------------------------------------------- 
    225       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    226       !----------------------------------------------------------------------- 
    227 #if defined key_zdftke2 
    228                         CALL bn2( tn, sn, rn2 )              ! now Brunt-Vaisala frequency 
    229 #else 
    230                         CALL bn2( tb, sb, rn2 )              ! before Brunt-Vaisala frequency 
    231 #endif 
    232233      !                                                     ! Vertical eddy viscosity and diffusivity coefficients 
    233234      IF( lk_zdfric )   CALL zdf_ric( kstp )                       ! Richardson number dependent Kz 
     
    261262#if defined key_zdftke2 
    262263      IF( .NOT. ln_dynhpg_imp ) THEN 
    263                         CALL bn2( tb, sb, rn2 )              ! before Brunt-Vaisala frequency 
    264264                        CALL eos( tb, sb, rhd, rhop )        ! now (swap=before) in situ density for dynhpg module 
    265265#endif 
     
    267267      !  LATERAL PHYSICS 
    268268      !----------------------------------------------------------------------- 
    269       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    270       !----------------------------------------------------------------------- 
    271       IF( lk_ldfslp     )   CALL ldf_slp( kstp, rhd, rn2 )       ! before slope of the lateral mixing 
     269      IF( lk_ldfslp     )   CALL ldf_slp( kstp, rhd, rn2b )      ! before slope of the lateral mixing 
    272270#if defined key_traldf_c2d 
    273271      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )                 ! eddy induced velocity coefficient 
     
    363361                               CALL dyn_spg( kstp, indic )    ! surface pressure gradient 
    364362                               CALL dyn_nxt( kstp )           ! lateral velocity at next time step 
    365       IF( lk_vvl )             CALL dom_vvl                   ! vertical mesh at next time step 
    366  
    367  
    368       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    369       ! Computation of diagnostic variables 
    370       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    371       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    372       !----------------------------------------------------------------------- 
    373                        CALL div_cur( kstp )                 ! Horizontal divergence & Relative vorticity 
    374       IF( n_cla == 1 ) CALL div_cla( kstp )                 ! Cross Land Advection (Update Hor. divergence) 
    375                        CALL wzv( kstp )                     ! Vertical velocity 
     363 
     364                               CALL ssh_nxt( kstp )           ! sea surface height at next time step 
    376365 
    377366      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.