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/TOP_SRC/trcini.F90 – 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.