COSP-RTTOV integration with CAM#1327
COSP-RTTOV integration with CAM#1327jshaw35 wants to merge 53 commits intoESCOMP:cam_developmentfrom
Conversation
…OV plus swathing, memory checks, and OPAQ outputs. Needs cleaning!
Merged cospsimulator_intro.F90 and bld/configure by hand. Needs testing to see if COSP-RTTOV functionality is maintained, specifically regarding the treatment of cloud water/ice and effectively water and ice droplet sizes.
…ld dependencies, clean up obsolete cloud water fields.
…te descriptions. Remove commented line from bld/configure
…endation from cacraig
… cosp.F90 this array should be: "Height of bottom interface of atm layer(km). First level contains the bottom of the top layer. Last level contains the bottom of the surface layer." Current CAM interface includes the top of the top layer and needs to be corrected.
This reverts commit 496a7ec. This was a mistake too, I meant to revert the commit that merged recent CAM updates.
|
@cacraigucar I have now ported the COSP-RTTOV interface code to the cam_development branch. These changes make CAM compatible with the COSP-RTTOV branch that @dustinswales and I are currently reviewing before merging into the official COSPv2.0 repository. I've updated the CAM namelist options and logic as well. I made the following tests for performance:
This pull request also corrects an answer-changing model error (cospsimulator_intr.F90) in the assignment of the "hgt_matrix_half" field that COSPv2.0 uses. Per cosp.F90 this array should be:
The current CAM interface sets the first level as the top of the top layer and allocates the array as length nlay+1 instead of nlay. This changes all fields that use the lidar_simulator subroutine (CALIPSO, PARASOL, etc) and RTTOV outputs. I think that this PR is ready for a more detailed review! I will be traveling for work until August 28th and will be slow to respond during that time. |
cacraigucar
left a comment
There was a problem hiding this comment.
Review items for us to discuss (if needed) at our meeting this afternoon
- Also, we need to add a COSP_RTTOV regression test
|
@jshaw35 - You somehow removed the submodule information - I put it back in. |
…into cam6_3_144_cosprttov
Made ERI test check for Gregorian+spinup compset incompatibility
…ogram outputs to 4d for outfld call. This commit addresses a bug that occurred when cosp_lradar_sim was set to true in user_nl_cam. This bug is likely in all versions of CAM because it is unrelated to swathing and RTTOV features.
…DIR)/build/Makefile.local directly into Makefile.rttov
…/CAM into cam6_3_144_cosprttov
…/CAM into cam6_3_144_cosprttov
cam6_4_168: Mini misc tag: ZM reserved ice cleanup; zmconv_tiedtke_add typo; HEMCO_CESM external update; ccpp_scheme_utils stub update
…ccess control directory
nusbaume
left a comment
There was a problem hiding this comment.
Thanks for bringing in this major new capability @jshaw35 and @cacraigucar! I have some requests, but they should hopefully all be small or something we can push off as future work. Of course if you have any questions or concerns with any of my requests just let me know. Thanks again!
|
@cacraigucar @nusbaume I have responded to all of the the code review comments, thank you for taking the time to look through all of these changes! I also noticed the rttov_libdir is not actually used (RTTOVDIR set in Makefile.rttov instead). I pushed another commit that removes rttov_libdir entirely. My draft of a future work section is below. Let me know if there is more to do. To-do's: Unify linking of RTTOV Linking RTTOV with CAM/CESM is currently split between multiple locations (bld/configure and cime_config/buildlib). Specifically, linking with hdf5 occurs in buildlib (where hdf5_lib_path can be accessed) and linking with the externally-compiled RTTOV libraries occurs in configure (where cosp_libdir can be accessed). Future work should unify these steps. Generalize and clean up RTTOV compiling script (src/physics/cosp2/COSP-RTTOV_examples/compile_RTTOV.sh) Notes: The "arch" file that is created in compile_RTTOV.sh is a direct copy of those provided in the official RTTOV source code that was adapted to ifx in order to compile/link RTTOV on Derecho. Adjusting this code makes it less consistent with other RTTOV files, but perhaps that is not a problem. Clean up flags in src/physics/cosp2/Makefile.rttov: Notes: openmp is likely not needed because RTTOV is built in a standard configuration without parallel capabilities (linking and running with parallel RTTOV did not improve performance during development, but has not been tested recently). O3 is also likely not needed. |
nusbaume
left a comment
There was a problem hiding this comment.
Thanks @jshaw35! Everything looks good to me now.
Cheryl and I will work on what are hopefully some finishing touches to our official regression test tomorrow (you probably got an invite). If everything goes well then we should hopefully have this PR officially merged in later this week. Thanks again for all your help on it!
Closes #1324
Closes #1328
Requires cime6.1.106 or later
I have coupled the COSP-RTTOV satellite emulator with CAM and would like to pull it into the main code repository. This update to COSP significantly extends emulation capabilities and is described here: https://egusphere.copernicus.org/preprints/2025/egusphere-2025-169/
An important note: Integrating with COSP-RTTOV with CAM requires linking an external build of RTTOV to CESM during the build step and changes to CIME. This is further complicated by the fact that the RTTOV source code is free but only available to registered users and creating a new build is slow relative to a normal CESM build, so linking an existing RTTOV build during CESM build appears to be the best solution.
CIME fork here: https://github.com/jshaw35/cime/tree/cime6.0.217_httpsbranch02_cosprttov