E3SM-Project / E3SM-Project/scream

ENERGY, keep open: Convert qneg4 routine to C++

Open
#2,372 9 comments 0 reactions 1 assignee Claimed by @tcclevenger View on GitHub
help wanted
Dominant language
No language data
Stars
79
Forks
54
PR merge metrics
No merged PRs in 30d

Description

The qneg4 routine in the v0 Fortran code (located at components/eam/src/physics/cam/qneg4.F90) needs to be converted to c++. This code block checks to see if moisture flux into the ground (negative value of latent heat flux) exceeds the total moisture content of the lowest model layer. Currently, v1 produces negative values of water vapor near the surface (primarily during model spin-up) and this will provide a patch for that in an energy conserving manner.

Lines 64 through 77 represent the essential code that needs to be converted. The rest of the code is for bookkeeping purposes to keep track of the number incidences of clipping (not sure if we want to convert that portion).

In v1 this block of code should be called in the macrophysics (SHOC) interface directly before shoc_main is called.

https://github.com/E3SM-Project/scream/blob/1084bdc66d2f60855de49420226580405a56673c/components/eam/src/physics/cam/qneg4.F90#L58-L77

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.