ESCOMP/CAM

Physics-side sponge layer diffusion coefficients are not being applied

Opened this issue · 2 comments

What happened?

The sponge layer diffusion coefficients for momentum set in src/physics/cam/vertical_diffusion.F90 are not being applied to the sponge layer. This bug impacts mid-top, WACCM and WACCM-X configurations. In the following loop adding kvm_sponge to kvm:

  !
  ! add sponge layer vertical diffusion
  !
  if (allocated(kvm_sponge)) then
     do k=1,size(kvm_sponge(:),1)
        kvm(:ncol,1) = kvm(:ncol,1)+kvm_sponge(k)
     end do
  end if

kvm has a hard coded level index of 1, where it should instead be k.

A separate issue with this code is that the kvm array is on the pverp grid, meaning level 1 is the top of the model, and are therefore of no consequence because the fin_vol_lu_decomp diffusion solver code uses a fixed or zero flux boundary condition. This implies the values of kvm_sponge(1) are also not of any consequence, even after fixing the bug. Running two simulations and varying kvm(:ncol,1), the answers are bfb, confirming that the model top kvm values are not used.

What are the steps to reproduce the bug?

Run FMTHIST or a WACCM/-X compset

What CAM tag were you using?

cam6_4_038

What machine were you running CAM on?

CISL machine (e.g. cheyenne)

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Yes

Extra info

@PeterHjortLauritzen

@PeterHjortLauritzen @adamrher Is this a bug that needs correcting in prior versions of the code, or did it creep in recently?

Hi Dan, this bug came in when implementing sponge layer diffusion on the physics side, in cam6_3_151 #968.