Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#689 closed upgrade (Done)

Important: Big update the Tracer Diffusion Algorithms

Reported by: arango Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.7
Component: Nonlinear Version: 3.7
Keywords: Cc:

Description (last modified by arango)

In src:ticket:627 update, The CPP option TCLIMATOLOGY that was used to process tracer climatology fields was eliminated and replaced with logical switch LtracerCLM, which is read from input script

! Logical switches (TRUE/FALSE) to read and process climatology fields.
! See glossary below for details.

     LsshCLM == F                          ! sea-surface height
      Lm2CLM == F                          ! 2D momentum
      Lm3CLM == F                          ! 3D momentum

  LtracerCLM == T T                        ! temperature, salinity, inert

This was done to facilitate processing or not climatology fields in multiple nesting grids.

This change affected the horizontal diffusion of tracers in routines t3dmix2_s.h, t3dmix2_geo.h, t3dmix2_iso.h, t3dmix4_s.h, t3dmix4_geo.h, and t3dmix4_iso.h when the tracer climatology is used in the diffusion operator. We need now to provide code to using the LtracerCLM(itrc,ng) logical instead of a CPP option that is now obsolete.

For example, in t3dmix2_s.h we now have:

!  Compute XI- and ETA-components of diffusive tracer flux (T m3/s).
          DO j=Jstr,Jend
            DO i=Istr,Iend+1
#ifdef DIFF_3DCOEF
              cff=0.25_r8*(diff3d_r(i,j,k)+diff3d_r(i-1,j,k))*          &
     &            pmon_u(i,j)
              cff=0.25_r8*(diff2(i,j,itrc)+diff2(i-1,j,itrc))*          &
     &            pmon_u(i,j)
#if defined TS_MIX_STABILITY
              FX(i,j)=cff*                                              &
     &                (Hz(i,j,k)+Hz(i-1,j,k))*                          &
     &                (0.75_r8*(t(i  ,j,k,nrhs,itrc)-                   &
     &                          t(i-1,j,k,nrhs,itrc))+                  &
     &                 0.25_r8*(t(i  ,j,k,nstp,itrc)-                   &
     &                          t(i-1,j,k,nstp,itrc)))
#elif defined TS_MIX_CLIMA
              IF (LtracerCLM(itrc,ng)) THEN
                FX(i,j)=cff*                                            &
     &                  (Hz(i,j,k)+Hz(i-1,j,k))*                        &
     &                  ((t(i  ,j,k,nrhs,itrc)-tclm(i  ,j,k,itrc))-     &
     &                   (t(i-1,j,k,nrhs,itrc)-tclm(i-1,j,k,itrc)))
                FX(i,j)=cff*                                            &
     &                  (Hz(i,j,k)+Hz(i-1,j,k))*                        &
     &                  (t(i,j,k,nrhs,itrc)-t(i-1,j,k,nrhs,itrc))
              END IF
              FX(i,j)=cff*                                              &
     &                (Hz(i,j,k)+Hz(i-1,j,k))*                          &
     &                (t(i,j,k,nrhs,itrc)-t(i-1,j,k,nrhs,itrc))
            END DO
          END DO

This update is complicated because include changes the NLM, TLM, RPM, and ADM versions of these routines. This changes get a little complex in the geopotential and isopycnic (epineutral) diffudion tensors.

Notice that we now have the following CPP options to characterize the tracer diffusion:

  • DIFF_3DCOEF: Used internally for spatially dependent horizontal diffusion coefficient, which is currently activated for TS_U3AVD_SPLIT and TS_DIFF4. However, the logic is included in all the tracer diffusion routines to facilitate spatially varying diffusion in the future.
  • TS_MIX_CLIMA: Use if diffusion of tracer perturbation (t-tclm). Previously, we used option CLIMA_TS_MIX to achieved this but it was renamed for consistency.
  • TS_MIX_MAX_SLOPE: Use if maximum slope in epineutral diffusion in routines t3dmix2_iso.h or t3dmix4_iso.h when MIX_ISO_TS is activated.
  • TS_MIX_MIN_STRAT: Use if minimum stratification in epineutral diffusion in routines t3dmix2_iso.h or t3dmix4_iso.h when MIX_ISO_TS is activated.
  • TS_MIX_STABILITY: Use if weighting diffusion between two time levels for stability. Previously, we used option MIX_STABILITY to achieved this but it was renamed for uniqueness and consistency.

Many thanks to Dezhou Yang for bringing this issue to my attention.

Change History (2)

comment:1 Changed 5 years ago by arango

  • Resolution set to Done
  • Status changed from new to closed

comment:2 Changed 4 years ago by arango

  • Description modified (diff)
Note: See TracTickets for help on using tickets.