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

CCPP'ize dadadj #1026

Open
wants to merge 7 commits into
base: cam_development
Choose a base branch
from
Open

Conversation

jtruesdal
Copy link
Collaborator

Refactor dadadj parameterization for inclusion in the CCPP framework. On the CAM side this entails moving the core parameterization over to atmos_phys and updating the dadadj_cam interface file to call the new library routine. There are additional mods to cime and ccs_config that are needed for the CAM-SIMA dadadj CCPP validation.

@cacraigucar cacraigucar added this to Open PRs - unassigned in CAM Development branch (cutting edge development) via automation May 6, 2024
@cacraigucar cacraigucar self-requested a review May 20, 2024 22:58
@cacraigucar cacraigucar requested a review from nusbaume May 28, 2024 16:49
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just had a couple of concerns related to the new error message generation.

@@ -50,9 +50,9 @@ tag = ALI_ARMS_v1.0.1
required = True

[atmos_phys]
tag = atmos_phys0_02_006
branch = dadadj
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding the usual reminder to point to a tag once ESCOMP/atmospheric_physics#91 has been approved and merged.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will do. Nice to know the order these things need to be done.

src/physics/cam/dadadj_cam.F90 Outdated Show resolved Hide resolved
src/physics/cam/dadadj_cam.F90 Outdated Show resolved Hide resolved
Copy link
Collaborator

@cacraigucar cacraigucar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it easier to review this along with the atmospheric_physics PR.

call outfld('DADADJ_PD', dadpdf(:ncol,:), ncol, lchnk)

! convert the t tendency to an s tendency for cam
ptend%s(:ncol,:) = ptend%s(:ncol,:) * cpairv(:ncol,:,lchnk)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nusbaume - Just wanting to confirm our definition of tendency_of_air_temperature? Is it without out the cpairv adjustment? If so, we may want to augment the conversion document to indicate the ptend%s special adjustment?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, tendency_of_air_temperature is basically the change in state%t (or air temperature), while ptend%s is technically the tendency_of_dry_air_enthalpy_at_constant_pressure, which in CAM we use to calculate the change state%t in physics_update by dividing by cpairv. So in other words:

ptend%t = ptend%s / cpairv

or in standard name lingo:

tendency_of_air_temperature = tendency_of_dry_air_enthalpy_at_constant_pressure / composition_dependent_specific_heat_of_dry_air_at_constant_pressure

Hopefully that makes sense? If not just let me know. Regardless I can say that I am pretty sure this new CAM code is correct as-is.

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

3 participants