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/TOP_SRC/TRP/trcsbc.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/TOP_SRC/TRP/trcsbc.F90

    r5385 r6808  
    2828   PUBLIC   trc_sbc   ! routine called by step.F90 
    2929 
    30    REAL(wp) ::   r2dt  !  time-step at surface 
    31  
    3230   !! * Substitutions 
    33 #  include "top_substitute.h90" 
     31#  include "vectopt_loop_substitute.h90" 
    3432   !!---------------------------------------------------------------------- 
    3533   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    7573      ! 
    7674      ! Allocate temporary workspace 
    77                       CALL wrk_alloc( jpi, jpj,      zsfx   ) 
    78       IF( l_trdtrc )  CALL wrk_alloc( jpi, jpj, jpk, ztrtrd ) 
     75                      CALL wrk_alloc( jpi,jpj,       zsfx   ) 
     76      IF( l_trdtrc )  CALL wrk_alloc( jpi,jpj,jpk,  ztrtrd ) 
    7977      ! 
    8078      zrtrn = 1.e-15_wp 
     
    8381         CASE( 0    )   ;   zswitch = 1  ! (0) standard levitating sea-ice : salt exchange only 
    8482         CASE( 1, 2 )   ;   zswitch = 0  ! (1) levitating sea-ice: salt and volume exchange but no pressure effect                                 
    85                                          ! (2) embedded sea-ice : salt and volume fluxes and pressure 
     83      !                                  ! (2) embedded sea-ice : salt and volume fluxes and pressure 
    8684      END SELECT 
    8785 
    8886      IF( ln_top_euler) THEN 
    89          r2dt =  rdttrc(1)              ! = rdttrc (use Euler time stepping) 
     87         r2dt =  rdttrc              ! = rdttrc (use Euler time stepping) 
    9088      ELSE 
    9189         IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000 
    92             r2dt = rdttrc(1)           ! = rdttrc (restarting with Euler time stepping) 
     90            r2dt = rdttrc            ! = rdttrc (restarting with Euler time stepping) 
    9391         ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    94             r2dt = 2. * rdttrc(1)       ! = 2 rdttrc (leapfrog) 
     92            r2dt = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    9593         ENDIF 
    9694      ENDIF 
     
    128126      ! Coupling offline : runoff are in emp which contains E-P-R 
    129127      ! 
    130       IF( .NOT. lk_offline .AND. lk_vvl ) THEN  ! online coupling with vvl 
     128      IF( .NOT. lk_offline .AND. .NOT.ln_linssh ) THEN  ! online coupling with vvl 
    131129         zsfx(:,:) = 0._wp 
    132130      ELSE                                      ! online coupling free surface or offline with free surface 
     
    137135      DO jn = 1, jptra 
    138136         ! 
    139          IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
    140          !                                             ! add the trend to the general tracer trend 
     137         IF( l_trdtrc )   ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
    141138 
    142139         IF ( nn_ice_tr == -1 ) THEN  ! No tracers in sea ice (null concentration in sea ice) 
     
    152149            DO jj = 2, jpj 
    153150               DO ji = fs_2, fs_jpim1   ! vector opt. 
    154                   zse3t = 1. / fse3t(ji,jj,1) 
     151                  zse3t = 1. / e3t_n(ji,jj,1) 
    155152                  ! tracer flux at the ice/ocean interface (tracer/m2/s) 
    156153                  zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 
     
    173170         DO jj = 2, jpj 
    174171            DO ji = fs_2, fs_jpim1   ! vector opt. 
    175                zse3t = zfact / fse3t(ji,jj,1) 
     172               zse3t = zfact / e3t_n(ji,jj,1) 
    176173               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 
    177174            END DO 
     
    202199                                           CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    203200      ENDIF 
    204                       CALL wrk_dealloc( jpi, jpj,      zsfx   ) 
    205       IF( l_trdtrc )  CALL wrk_dealloc( jpi, jpj, jpk, ztrtrd ) 
     201                      CALL wrk_dealloc( jpi,jpj,       zsfx   ) 
     202      IF( l_trdtrc )  CALL wrk_dealloc( jpi,jpj,jpk,  ztrtrd ) 
    206203      ! 
    207204      IF( nn_timing == 1 )  CALL timing_stop('trc_sbc') 
Note: See TracChangeset for help on using the changeset viewer.