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 6808 for branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90 – NEMO

Ignore:
Timestamp:
2016-07-19T10:38:35+02:00 (8 years ago)
Author:
jamesharle
Message:

merge with trunk@6232 for consistency with SSB code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90

    r5215 r6808  
    1717   USE trd_oce        ! trends: ocean variables 
    1818   USE eosbn2         ! equation of state and related derivatives 
    19    USE ldftra_oce     ! ocean active tracers lateral physics 
     19   USE ldftra         ! lateral diffusion: eddy diffusivity & EIV coeff. 
    2020   USE zdfddm         ! vertical physics: double diffusion 
    2121   USE phycst         ! physical constants 
     22   ! 
    2223   USE in_out_manager ! I/O manager 
    2324   USE iom            ! I/O manager library 
     
    3637 
    3738   !! * Substitutions 
    38 #  include "domzgr_substitute.h90" 
    3939#  include "zdfddm_substitute.h90" 
    4040#  include "vectopt_loop_substitute.h90" 
     
    7878      zpe(:,:,:) = 0._wp 
    7979      ! 
    80       IF ( kt /= nkstp ) THEN   ! full eos: set partial derivatives at the 1st call of kt time step 
     80      IF( kt /= nkstp ) THEN     ! full eos: set partial derivatives at the 1st call of kt time step 
    8181         nkstp = kt 
    8282         CALL eos_pen( tsn, rab_PE, zpe ) 
     
    9696      CASE ( jptra_yad  )   ;   CALL iom_put( "petrd_yad", zpe )   ! merid.   advection 
    9797      CASE ( jptra_zad  )   ;   CALL iom_put( "petrd_zad", zpe )   ! vertical advection 
    98                                 IF( .NOT.lk_vvl ) THEN                   ! cst volume : adv flux through z=0 surface 
     98                                IF( ln_linssh ) THEN                   ! cst volume : adv flux through z=0 surface 
    9999                                   CALL wrk_alloc( jpi, jpj, z2d ) 
    100100                                   z2d(:,:) = wn(:,:,1) * ( & 
    101                                       &   - ( rab_n(:,:,1,jp_tem) + rab_pe(:,:,1,jp_tem) ) * tsn(:,:,1,jp_tem)    & 
    102                                       &   + ( rab_n(:,:,1,jp_sal) + rab_pe(:,:,1,jp_sal) ) * tsn(:,:,1,jp_sal)    & 
    103                                       &                  ) / fse3t(:,:,1) 
     101                                     &   - ( rab_n(:,:,1,jp_tem) + rab_pe(:,:,1,jp_tem) ) * tsn(:,:,1,jp_tem)    & 
     102                                     &   + ( rab_n(:,:,1,jp_sal) + rab_pe(:,:,1,jp_sal) ) * tsn(:,:,1,jp_sal)    & 
     103                                     & ) / e3t_n(:,:,1) 
    104104                                   CALL iom_put( "petrd_sad" , z2d ) 
    105105                                   CALL wrk_dealloc( jpi, jpj, z2d ) 
     
    115115      CASE ( jptra_bbc  )   ;   CALL iom_put( "petrd_bbc" , zpe )   ! bottom bound cond (geoth flux) 
    116116      CASE ( jptra_atf  )   ;   CALL iom_put( "petrd_atf" , zpe )   ! asselin time filter (last trend) 
    117                                 !IF( .NOT.lk_vvl ) THEN                   ! cst volume : ssh term (otherwise include in e3t variation) 
     117                                !IF( ln_linssh ) THEN                   ! cst volume : ssh term (otherwise include in e3t variation) 
    118118                                !   CALL wrk_alloc( jpi, jpj, z2d ) 
    119119                                !   z2d(:,:) = ( ssha(:,:) - sshb(:,:) )                 & 
    120120                                !      &     * (   dPE_dt(:,:,1) * tsn(:,:,1,jp_tem)    & 
    121                                 !      &         + dPE_ds(:,:,1) * tsn(:,:,1,jp_sal)  ) / ( fse3t(:,:,1) * pdt ) 
     121                                !      &         + dPE_ds(:,:,1) * tsn(:,:,1,jp_sal)  ) / ( e3t_n(:,:,1) * pdt ) 
    122122                                !   CALL iom_put( "petrd_sad" , z2d ) 
    123123                                !   CALL wrk_dealloc( jpi, jpj, z2d ) 
     
    150150      rab_pe(:,:,:,:) = 0._wp 
    151151      ! 
    152       IF ( lk_vvl              )   CALL ctl_stop('trd_pen_init : PE trends not coded for variable volume') 
     152      IF( .NOT.ln_linssh )   CALL ctl_stop('trd_pen_init : PE trends not coded for variable volume') 
    153153      ! 
    154154      nkstp     = nit000 - 1 
Note: See TracChangeset for help on using the changeset viewer.