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 6309 for trunk/NEMOGCM/NEMO – NEMO

Changeset 6309 for trunk/NEMOGCM/NEMO


Ignore:
Timestamp:
2016-02-12T12:47:24+01:00 (8 years ago)
Author:
cetlod
Message:

trunk : bugfix on passive tracers damping, see ticket #1677

Location:
trunk/NEMOGCM/NEMO/TOP_SRC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90

    r6140 r6309  
    104104               ! 
    105105               jl = n_trc_index(jn)  
    106                CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    107                ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     106               CALL trc_dta( kt, sf_trcdta(jl) )   ! read tracer data at nit000 
     107               ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) * tmask(:,:,:) * rf_trfac(jl) 
    108108               ! 
    109109               SELECT CASE ( nn_zdmp_tr ) 
     
    243243      INTEGER ::   ji , jj, jk, jn, jl, jc   ! dummy loop indicesa 
    244244      INTEGER ::   isrow                     ! local index 
    245       REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrcdta   ! 3D  workspace 
    246245      !!---------------------------------------------------------------------- 
    247246      ! 
     
    333332         IF(lwp)  WRITE(numout,*) 
    334333         ! 
    335          CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )   ! Memory allocation 
    336          ! 
    337334         DO jn = 1, jptra 
    338335            IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    339336                jl = n_trc_index(jn) 
    340                 CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    341                 ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     337                CALL trc_dta( kt, sf_trcdta(jl) )   ! read tracer data at nit000 
    342338                DO jc = 1, npncts 
    343339                   DO jk = 1, jpkm1 
    344340                      DO jj = nctsj1(jc), nctsj2(jc) 
    345341                         DO ji = nctsi1(jc), nctsi2(jc) 
    346                             trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk) * tmask(ji,jj,jk) 
     342                            trn(ji,jj,jk,jn) = sf_trcdta(jl)%fnow(ji,jj,jk) * tmask(ji,jj,jk) * rf_trfac(jl) 
    347343                            trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 
    348344                         ENDDO 
     
    352348             ENDIF 
    353349          ENDDO 
    354           CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
     350         ! 
    355351      ENDIF 
    356352      ! 
  • trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r6140 r6309  
    167167            END DO 
    168168         ENDIF 
     169         ! 
     170         CALL lbc_lnk( sbc_trc(:,:,jn), 'T', 1. ) 
    169171         !                                       Concentration dilution effect on tracers due to evaporation & precipitation  
    170172         DO jj = 2, jpj 
  • trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r6140 r6309  
    6565         IF( lk_trabbl )        CALL trc_bbl    ( kt )      ! advective (and/or diffusive) bottom boundary layer scheme 
    6666         IF( ln_trcdmp )        CALL trc_dmp    ( kt )      ! internal damping trends 
    67          IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kt )      ! internal damping trends on closed seas only 
    6867         IF( lk_bdy )           CALL trc_bdy_dmp( kt )      ! BDY damping trends 
    6968                                CALL trc_adv    ( kt )      ! horizontal & vertical advection  
     
    8281                                CALL trc_nxt    ( kt )      ! tracer fields at next time step      
    8382         IF( ln_trcrad )        CALL trc_rad    ( kt )      ! Correct artificial negative concentrations 
     83         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kt )      ! internal damping trends on closed seas only 
    8484 
    8585#if defined key_agrif 
  • trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90

    r6140 r6309  
    159159 
    160160 
    161    SUBROUTINE trc_dta( kt, sf_dta, zrf_trfac ) 
     161   SUBROUTINE trc_dta( kt, sf_dta ) 
    162162      !!---------------------------------------------------------------------- 
    163163      !!                   ***  ROUTINE trc_dta  *** 
     
    171171      !! ** Action  :   sf_dta   passive tracer data on medl mesh and interpolated at time-step kt 
    172172      !!---------------------------------------------------------------------- 
    173       INTEGER                     , INTENT(in   ) ::   kt     ! ocean time-step 
     173      INTEGER                     , INTENT(in ) ::   kt     ! ocean time-step 
    174174      TYPE(FLD), DIMENSION(1)   , INTENT(inout) ::   sf_dta     ! array of information on the field to read 
    175       REAL(wp)                  , INTENT(in   ) ::   zrf_trfac  ! multiplication factor 
    176175      ! 
    177176      INTEGER ::   ji, jj, jk, jl, jkk, ik    ! dummy loop indices 
     
    237236         ENDIF 
    238237         ! 
    239          sf_dta(1)%fnow(:,:,:) = sf_dta(1)%fnow(:,:,:) * zrf_trfac   !  multiplicative factor 
    240          ! 
    241238      ENDIF 
    242239      ! 
  • trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r6140 r6309  
    204204      ! 
    205205      INTEGER ::   jk, jn, jl    ! dummy loop indices 
    206       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace 
    207206      !!---------------------------------------------------------------------- 
    208207      ! 
     
    221220        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    222221            ! 
    223             CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation 
    224             ! 
    225             DO jn = 1, jptra 
     222           DO jn = 1, jptra 
    226223               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    227224                  jl = n_trc_index(jn)  
    228                   CALL trc_dta( nit000, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    229                   ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
    230                   trn(:,:,:,jn) = ztrcdta(:,:,:) * tmask(:,:,:)   
     225                  CALL trc_dta( nit000, sf_trcdta(jl) )   ! read tracer data at nit000 
     226                  trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:) * tmask(:,:,:) * rf_trfac(jl) 
     227                  ! 
    231228                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
    232229                     !                                                    (data used only for initialisation) 
     
    238235               ENDIF 
    239236            ENDDO 
    240             CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
     237            ! 
    241238        ENDIF 
    242239        ! 
Note: See TracChangeset for help on using the changeset viewer.