-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add TUV-x to CAM #784
base: cam_development
Are you sure you want to change the base?
Add TUV-x to CAM #784
Conversation
Develop 160 tuv build
Develop 162 draft wrapper
cime_config/buildnml
Outdated
shutil.copytree(os.path.join(srcroot, "libraries", "musica", "lib", \ | ||
"tuv-x", "data"), dest_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a large number of small data files for cross sections and quantum yields that are currently part of the TUV-x repo (but may eventually move to a database of some kind). These are not CAM-specific files and will be used by other models that link to TUV-x. Is this the correct way to stage them for use in a CAM run? @nusbaume @cacraigucar
shutil.copy2(os.path.join(srcroot, "cime_config", "tuvx_MOZART.json"), \ | ||
os.path.join(rundir, "tuvx_MOZART.json")) | ||
shutil.copy2(os.path.join(srcroot, "cime_config", "tuvx_MOZART_TS1.json"), \ | ||
os.path.join(rundir, "tuvx_MOZART_TS1.json")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two CAM-specific configuration files (each for specific MOZART chemical mechanisms) needed to use TUV-x in CAM. Should these be moved to the CAM dataset repository? @nusbaume @cacraigucar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handling for config files looks similar to what we originally did for GEOS-Chem. Ultimately we decided to keep the config files in the source code, copy them at case setup time to the case root via cam/cime_config/case.case_setup.py, and then copy from case root to run directory upon submit (via this code in buildnml). This is good if you think your config file template will be tied to source code version and you want users to be able to custom edit it prior to run-time(from case root).
Externals.cfg
Outdated
@@ -21,9 +21,9 @@ externals = Externals.cfg | |||
required = True | |||
|
|||
[cmeps] | |||
tag = cmeps0.14.12 | |||
branch = develop-add-linked-libs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pending CMEPS PR 356
* update to latest TUV-x * add heating rate terms to config * add heating rate calcs * remove default output of photo rates * remove default TUV-x output * initialize heating rates to zero * fix max sza type * update TUV-x commit
…dexing (#10) * link to cpp std lib * fix CMake flag, update TUV-x, and fix aerosol wavelength grid use
Are there plans to bring biological effects in to this PR? @coupewx has coupled a version of WACCM4 with TUV (from @cbardeen) to POP in CESM2 to compute UV inhibition in ocean plankton groups; we would like to bring this work into CESM3 (with MOM6 instead of POP), and are trying to scope out what would be involved. If this update to CAM provides fields like UV index and phytoplankton damage per Cullen et al (see this block of code from the version of CAM he is currently using), that would reduce the workload on our end. We skimmed through the changes in this PR and didn't see anything - if we missed something, could you please point us to it? |
@dkinnison should weigh in on this |
@mattldawson |
args += "-DCMAKE_C_COMPILER_WORKS=1 " | ||
args += "-DCMAKE_Fortran_COMPILER_WORKS=1 " | ||
args += "-DCMAKE_CXX_COMPILER_WORKS=1 " | ||
cmd = "cmake {} .".format(args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattldawson
I believe to get the correct compiler flags you need this line:
args += "-DDEBUG={} ".format(build.get_value("DEBUG"))
This PR contributes to #757 by including TUV-x in the CAM build and introducing a TUV-x wrapper to allow CAM-Chem photolysis rates to be calculated in-line by TUV-x. @stacywalters @tilmes @lkemmons @dkinnison
Using TUV-x for photolysis rate calculations in CAM runs is disabled pending science evaluation/implementation of:
This is my first CAM PR and I have some remaining questions about the correct way to do some things (which I will add as comments on this PR), so I'm leaving it in draft mode for now.