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 5296 for branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2015-05-27T12:47:55+02:00 (9 years ago)
Author:
pabouttier
Message:

Commit stochastic parametrization module and perturbation of EOS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/NEMO/OPA_SRC/step.F90

    r5147 r5296  
    106106 
    107107      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     108      ! Update stochastic parameters and random T/S fluctuations 
     109      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     110                        CALL sto_par( kstp )          ! Stochastic parameters 
     111 
     112      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    108113      ! Ocean physics update                (ua, va, tsa used as workspace) 
    109114      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     
    145150      ! 
    146151      IF( lk_ldfslp ) THEN                            ! slope of lateral mixing 
     152         IF(ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations 
    147153                         CALL eos( tsb, rhd, gdept_0(:,:,:) )               ! before in situ density 
    148154         IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    173179      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    174180                         CALL ssh_nxt       ( kstp )  ! after ssh (includes call to div_cur) 
    175       IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp )  ! after vertical scale factors  
    176                          CALL wzv           ( kstp )  ! now cross-level velocity  
    177  
    178       IF( lk_dynspg_ts ) THEN  
     181      IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp )  ! after vertical scale factors 
     182                         CALL wzv           ( kstp )  ! now cross-level velocity 
     183 
     184      IF( lk_dynspg_ts ) THEN 
    179185          ! In case the time splitting case, update almost all momentum trends here: 
    180186          ! Note that the computation of vertical velocity above, hence "after" sea level 
    181187          ! is necessary to compute momentum advection for the rhs of barotropic loop: 
     188            IF(ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations 
    182189                            CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 
    183190            IF( ln_zps .AND. .NOT. ln_isfcav)                               & 
     
    210217                                  CALL div_cur( kstp )         ! Horizontal divergence & Relative vorticity (2nd call in time-split case) 
    211218          IF( lk_vvl     )        CALL dom_vvl_sf_nxt( kstp, kcall=2 )  ! after vertical scale factors (update depth average component) 
    212                                   CALL wzv           ( kstp )  ! now cross-level velocity  
     219                                  CALL wzv           ( kstp )  ! now cross-level velocity 
    213220      ENDIF 
    214221 
     
    261268         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    262269                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
     270            IF(ln_sto_eos )  CALL sto_pts( tsn )    ! Random T/S fluctuations 
    263271                             CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation 
    264272            IF( ln_zps .AND. .NOT. ln_isfcav)                                & 
     
    271279      ELSE                                                  ! centered hpg  (eos then time stepping) 
    272280         IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case 
     281             IF(ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations 
    273282                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
    274283         IF( ln_zps .AND. .NOT. ln_isfcav)                                   & 
    275284               &             CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient 
    276285               &                                           rhd, gru , grv    )  ! of t, s, rd at the last ocean level 
    277          IF( ln_zps .AND.       ln_isfcav)                                   &  
     286         IF( ln_zps .AND.       ln_isfcav)                                   & 
    278287               &             CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps for top cell (ISF) 
    279288               &                                           rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   & 
     
    292301                               ua(:,:,:) = ua_sv(:,:,:) 
    293302                               va(:,:,:) = va_sv(:,:,:) 
    294                                                              ! Revert now divergence and rotational to previously computed ones  
     303                                                             ! Revert now divergence and rotational to previously computed ones 
    295304                                                             !(needed because of the time swap in div_cur, at the beginning of each time step) 
    296305                               hdivn(:,:,:) = hdivb(:,:,:) 
    297                                rotn(:,:,:)  = rotb(:,:,:)  
     306                               rotn(:,:,:)  = rotb(:,:,:) 
    298307 
    299308                               CALL dyn_bfr( kstp )         ! bottom friction 
     
    349358      ! 
    350359#if defined key_iomput 
    351       IF( kstp == nitend .OR. indic < 0 ) THEN  
     360      IF( kstp == nitend .OR. indic < 0 ) THEN 
    352361                      CALL iom_context_finalize( "nemo"     ) ! needed for XIOS+AGRIF 
    353          IF( ln_crs ) CALL iom_context_finalize( "nemo_crs" ) !  
     362         IF( ln_crs ) CALL iom_context_finalize( "nemo_crs" ) ! 
    354363      ENDIF 
    355364#endif 
Note: See TracChangeset for help on using the changeset viewer.