Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics-side sponge layer diffusion coefficients are not being applied #1182

Open
adamrher opened this issue Nov 3, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working correctly

Comments

@adamrher
Copy link

adamrher commented Nov 3, 2024

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

@dan800
Copy link
Collaborator

dan800 commented Nov 15, 2024

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

@adamrher
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
Status: To Do
Development

No branches or pull requests

2 participants