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 6308 – NEMO

Changeset 6308


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

3.6 stable : bugfix on passive tracers damping, see ticket #1677

Location:
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90

    r5506 r6308  
    107107                
    108108               jl = n_trc_index(jn)  
    109                CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    110                ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     109               CALL trc_dta( kt, sf_trcdta(jl) )   ! read tracer data at nit000 
     110               ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) * tmask(:,:,:) * rf_trfac(jl) 
    111111 
    112112               SELECT CASE ( nn_zdmp_tr ) 
     
    187187      INTEGER :: ji , jj, jk, jn, jl, jc                     ! dummy loop indicesa 
    188188      INTEGER :: isrow                                      ! local index 
    189       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta       ! 3D  workspace 
    190189 
    191190      !!---------------------------------------------------------------------- 
     
    278277         IF(lwp)  WRITE(numout,*) 
    279278         ! 
    280          CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )   ! Memory allocation 
    281          ! 
    282279         DO jn = 1, jptra 
    283280            IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    284281                jl = n_trc_index(jn) 
    285                 CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    286                 ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     282                CALL trc_dta( kt, sf_trcdta(jl) )   ! read tracer data at nit000 
    287283                DO jc = 1, npncts 
    288284                   DO jk = 1, jpkm1 
    289285                      DO jj = nctsj1(jc), nctsj2(jc) 
    290286                         DO ji = nctsi1(jc), nctsi2(jc) 
    291                             trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk) * tmask(ji,jj,jk) 
     287                            trn(ji,jj,jk,jn) = sf_trcdta(jl)%fnow(ji,jj,jk) * tmask(ji,jj,jk) * rf_trfac(jl) 
    292288                            trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 
    293289                         ENDDO 
     
    297293             ENDIF 
    298294          ENDDO 
    299           CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
     295          ! 
    300296      ENDIF 
    301297      ! 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r5385 r6308  
    170170            END DO 
    171171         ENDIF 
     172         ! 
     173         CALL lbc_lnk( sbc_trc(:,:,jn), 'T', 1. ) 
    172174         !                                       Concentration dilution effect on tracers due to evaporation & precipitation  
    173175         DO jj = 2, jpj 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r5120 r6308  
    6767         IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme 
    6868         IF( ln_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends 
    69          IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only 
    7069                                CALL trc_adv( kstp )            ! horizontal & vertical advection  
    7170                                CALL trc_ldf( kstp )            ! lateral mixing 
     
    7877                                CALL trc_nxt( kstp )            ! tracer fields at next time step      
    7978         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations 
     79         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kstp )        ! internal damping trends on closed seas only 
    8080 
    8181#if defined key_agrif 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/trcdta.F90

    r5385 r6308  
    151151 
    152152 
    153    SUBROUTINE trc_dta( kt, sf_dta, zrf_trfac ) 
     153   SUBROUTINE trc_dta( kt, sf_dta ) 
    154154      !!---------------------------------------------------------------------- 
    155155      !!                   ***  ROUTINE trc_dta  *** 
     
    165165      INTEGER                     , INTENT(in   ) ::   kt     ! ocean time-step 
    166166      TYPE(FLD), DIMENSION(1)   , INTENT(inout) ::   sf_dta     ! array of information on the field to read 
    167       REAL(wp)                  , INTENT(in   ) ::   zrf_trfac  ! multiplication factor 
    168167      ! 
    169168      INTEGER ::   ji, jj, jk, jl, jkk, ik    ! dummy loop indices 
     
    234233         ENDIF 
    235234         ! 
    236          sf_dta(1)%fnow(:,:,:) = sf_dta(1)%fnow(:,:,:) * zrf_trfac   !  multiplicative factor 
    237          ! 
    238235         IF( lwp .AND. kt == nit000 ) THEN 
    239236               clndta = TRIM( sf_dta(1)%clvar )  
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r5407 r6308  
    6161      INTEGER ::   jk, jn, jl    ! dummy loop indices 
    6262      CHARACTER (len=25) :: charout 
    63       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace 
    6463      !!--------------------------------------------------------------------- 
    6564      ! 
     
    121120        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    122121            ! 
    123             CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation 
    124             ! 
    125122            DO jn = 1, jptra 
    126123               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    127124                  jl = n_trc_index(jn)  
    128                   CALL trc_dta( nit000, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
    129                   ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
    130                   trn(:,:,:,jn) = ztrcdta(:,:,:) * tmask(:,:,:)   
     125                  CALL trc_dta( nit000, sf_trcdta(jl) )   ! read tracer data at nit000 
     126                  trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:) * tmask(:,:,:) * rf_trfac(jl) 
     127                  ! 
    131128                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
    132129                     !                                                    (data used only for initialisation) 
     
    138135               ENDIF 
    139136            ENDDO 
    140             CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
     137            ! 
    141138        ENDIF 
    142139        ! 
Note: See TracChangeset for help on using the changeset viewer.