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

Calculate solar zenith angle and Earth–Sun distance and make them available to physics schemes #328

Closed
mattldawson opened this issue Dec 3, 2024 · 0 comments
Assignees

Comments

@mattldawson
Copy link
Collaborator

Issue Type

Other (please describe below)

Issue Description

Some modules in https://github.com/ESCOMP/atmospheric_physics/ (including TUV-x) need to know the solar zenith angle and Earth–Sun distance. In CAM, these are calculated in code shared with other CESM models: https://github.com/ESCOMP/CESM_share/blob/f6f31fd61cb8f80aee97311fcca64b3e26b0202c/src/shr_orb_mod.F90#L110-L159
https://github.com/ESCOMP/CESM_share/blob/f6f31fd61cb8f80aee97311fcca64b3e26b0202c/src/shr_orb_mod.F90#L736-L814

After a discussion among the CAM-SIMA developers, it was decided that CAM-SIMA should calculate these variables at the beginning of each physics timestep and provide them as standard-name CCPP variables to the physics schemes.

Acceptance Criteria

  • Solar zenith angle and Earth–Sun distance are calculated using shared code from ESCOMP/CESM_share in CAM-SIMA at the beginning of each physics timestep and made available as CCPP variables with standard names

@nusbaume @peverwhee @cacraigucar - does this sound right? If you have any examples of similar calculations in CAM-SIMA, please send me a link

Will this change answers?

I Don't Know

Will you be implementing this yourself?

Yes

@mattldawson mattldawson self-assigned this Dec 3, 2024
mattldawson added a commit to ESCOMP/atmospheric_physics that referenced this issue Dec 14, 2024
Adds the calculation of solar zenith angle and Earth-Sun distance needed
as inputs to TUV-x.

closes #163 
closes #164 

Both calculations required functions that are currently in shared code
in CAM
[here](https://github.com/ESCOMP/CESM_share/blob/f6f31fd61cb8f80aee97311fcca64b3e26b0202c/src/shr_orb_mod.F90#L736-L814)
and
[here](https://github.com/ESCOMP/CESM_share/blob/f6f31fd61cb8f80aee97311fcca64b3e26b0202c/src/shr_orb_mod.F90#L110-L159)
that I put in a modified form in the `to_be_ccppized/` folder. @nusbaume
@peverwhee - if there is a better way to handle these functions, let me
know and I can update the PR.

Requires an update to CAM-SIMA that is in review to make certain
variables available through CCPP
(ESCOMP/CAM-SIMA#325)

After more discussion, the plan is to use the shared functions in
CAM-SIMA and pass the outputs through CCPP. So, this PR will be put in
draft until this issue is finished:
ESCOMP/CAM-SIMA#328

A related draft PR to CAM-SIMA has been added
(ESCOMP/CAM-SIMA#337) and will be un-drafted
once this PR is merged in.
mattldawson added a commit that referenced this issue Dec 31, 2024
Tag name (required for release branches):
Originator(s): Matt Dawson

Description (include the issue title, and the keyword ['closes',
'fixes', 'resolves'] followed by the issue number):

Adds the calculation of solar zenith angle and Earth–Sun distance and
makes them available as CCPP standard named variables.

@nusbaume - I wasn't sure if I put the call to recalculate the orbital
properties is correct. If it isn't let me know, and I can move it.

closes #328 
Additionally:
- adds some stubbed-out dependencies needed for MUSICA, until the actual
values are available from other physics schemes or the host model
- adds some testing infrastructure needed for unit tests of this code.
Once #326 is merged in, I can update this PR to use the new unit testing
infrastructure

In draft until ESCOMP/atmospheric_physics#171 is
merged in

Describe any changes made to build system:
none

Describe any changes made to the namelist:
none

List any changes to the defaults for the input datasets (e.g. boundary
datasets):
none

List all files eliminated and why:
none

List all files added and what they do:

List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)

If there are new failures (compared to the
`test/existing-test-failures.txt` file),
have them OK'd by the gatekeeper, note them here, and add them to the
file.
If there are baseline differences, include the test and the reason for
the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima:

derecho/gnu/aux_sima:

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than
latest:

---------

Co-authored-by: Courtney Peverley <courtneyp@ucar.edu>
Co-authored-by: Kuan-Chih Wang <kuanchihw@ucar.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants