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

Ignore:
Timestamp:
2012-11-19T15:21:34+01:00 (11 years ago)
Author:
rblod
Message:

Adding routines and modules for TAM - Ticket #1005

File:
1 edited

Legend:

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

    r3294 r3604  
    2929   !!   stp             : OPA system time-stepping 
    3030   !!---------------------------------------------------------------------- 
    31    USE step_oce         ! time stepping definition modules  
     31   USE step_oce         ! time stepping definition modules 
    3232#if defined key_top 
    3333   USE trcstp           ! passive tracer time-stepping      (trc_stp routine) 
     
    6161      !!---------------------------------------------------------------------- 
    6262      !!                     ***  ROUTINE stp  *** 
    63       !!                       
     63      !! 
    6464      !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.) 
    6565      !!              - Time stepping of LIM (dynamic and thermodynamic eqs.) 
    6666      !!              - Tme stepping  of TRC (passive tracer eqs.) 
    67       !!  
    68       !! ** Method  : -1- Update forcings and data   
    69       !!              -2- Update ocean physics  
    70       !!              -3- Compute the t and s trends  
    71       !!              -4- Update t and s  
     67      !! 
     68      !! ** Method  : -1- Update forcings and data 
     69      !!              -2- Update ocean physics 
     70      !!              -3- Compute the t and s trends 
     71      !!              -4- Update t and s 
    7272      !!              -5- Compute the momentum trends 
    7373      !!              -6- Update the horizontal velocity 
     
    8585# if defined key_iomput 
    8686      IF( Agrif_Nbstepint() == 0 )   CALL iom_swap 
    87 # endif    
    88 #endif    
     87# endif 
     88#endif 
    8989                             indic = 0                ! reset to no error condition 
    9090      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
     
    111111                         CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency 
    112112      ! 
    113       !  VERTICAL PHYSICS    
     113      !  VERTICAL PHYSICS 
    114114                         CALL zdf_bfr( kstp )         ! bottom friction 
    115                           
     115 
    116116      !                                               ! Vertical eddy viscosity and diffusivity coefficients 
    117117      IF( lk_zdfric  )   CALL zdf_ric( kstp )            ! Richardson number dependent Kz 
     
    133133      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   & 
    134134         &               CALL zdf_ddm( kstp )         ! double diffusive mixing 
    135           
     135 
    136136                         CALL zdf_mxl( kstp )         ! mixed layer depth 
    137137 
     
    140140      IF( lrst_oce .AND. lk_zdfgls )   CALL gls_rst( kstp, 'WRITE' ) 
    141141      ! 
    142       !  LATERAL  PHYSICS  
     142      !  LATERAL  PHYSICS 
    143143      ! 
    144144      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
     
    179179      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    180180                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero 
     181      ! Saving non-linear trajectory at restart state 
     182      ! May not be exact for sbc and zdf parameters 
     183      IF( ( ln_trjhand ) .AND. ( kstp == nit000 ) ) CALL tam_trj_wri( kstp - 1 ) 
    181184 
    182185      IF(  ln_asmiau .AND. & 
     
    201204         IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsa, gtsu, gtsv,  &    ! zps: time filtered hor. derivative 
    202205            &                                          rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
    203           
     206 
    204207      ELSE                                                  ! centered hpg  (eos then time stepping) 
    205208                             CALL eos    ( tsn, rhd, rhop )      ! now in situ density for hpg computation 
     
    208211         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    209212                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
    210       ENDIF  
     213      ENDIF 
    211214 
    212215      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    218221      IF(  ln_asmiau .AND. & 
    219222         & ln_dyninc       )   CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
     223      IF( ln_bkgwri )          CALL asm_bkg_wri( kstp )     ! output background fields 
    220224      IF( ln_neptsimp )        CALL dyn_nept_cor( kstp )    ! subtract Neptune velocities (simplified) 
    221225                               CALL dyn_adv( kstp )         ! advection (vector or flux form) 
     
    227231#endif 
    228232                               CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure 
    229                                CALL dyn_bfr( kstp )         ! bottom friction    
     233                               CALL dyn_bfr( kstp )         ! bottom friction 
    230234                               CALL dyn_zdf( kstp )         ! vertical diffusion 
    231235                               CALL dyn_spg( kstp, indic )  ! surface pressure gradient 
     
    252256      ! Trends                              (ua, va, tsa used as workspace) 
    253257      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    254       IF( nstop == 0 ) THEN                          
    255          IF( lk_trddyn     )   CALL trd_dwr( kstp )         ! trends: dynamics  
     258      IF( nstop == 0 ) THEN 
     259         IF( lk_trddyn     )   CALL trd_dwr( kstp )         ! trends: dynamics 
    256260         IF( lk_trdtra     )   CALL trd_twr( kstp )         ! trends: active tracers 
    257          IF( lk_trdmld     )   CALL trd_mld( kstp )         ! trends: Mixed-layer  
     261         IF( lk_trdmld     )   CALL trd_mld( kstp )         ! trends: Mixed-layer 
    258262         IF( lk_trdvor     )   CALL trd_vor( kstp )         ! trends: vorticity budget 
    259263      ENDIF 
     264 
     265      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     266      ! Trajectory for TAM 
     267      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     268 
     269      IF( ln_trjhand ) CALL tam_trj_wri( kstp )          ! Output trajectory fields 
    260270 
    261271      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.