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

Clean up Optics in AGCM.rc.tmpl #319

Merged
merged 3 commits into from
May 2, 2022
Merged

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Apr 25, 2022

After talking with @dr0cloud about how to get RRTMGP to work with GOCART2G, I realized that some of the lines in AGCM.rc.tmpl are now superfluous. The Mie optics tables are now handled inside of GOCART and they aren't read through AGCM.rc. So, we can remove them.

Note that enabling RRTMGP now requires both modifying AGCM.rc in an experiment as well as changing the GOCART instance rc files. Something like this:

# Move GOCART to use RRTMGP Bands
# -------------------------------
set instance_files = `/bin/ls -1 *_instance*.rc`
foreach instance ($instance_files)
   /bin/mv $instance $instance.tmp
   cat $instance.tmp | sed -e '/RRTMG/ s#RRTMG#RRTMGP#' > $instance
   /bin/rm $instance.tmp
end

can do it. This probably indicates that when multiple people start testing RRTMGP, we'll want to add a question to gcm_setup to add this code automatically (as well as transform AGCM.rc.tmpl in the right way.

ETA: I've pushed changes to gcm_run, gcm_regress, and gcm_forecast with this:

# Move GOCART to use RRTMGP Bands
# -------------------------------
# UNCOMMENT THE LINES BELOW IF RUNNING RRTMGP
#
#set instance_files = `/bin/ls -1 *_instance*.rc`
#foreach instance ($instance_files)
#   /bin/mv $instance $instance.tmp
#   cat $instance.tmp | sed -e '/RRTMG/ s#RRTMG#RRTMGP#' > $instance
#   /bin/rm $instance.tmp
#end

so that @dr0cloud or anyone that wants to run RRTMGP can just comment out these lines. Not perfect, but will let people not have to remember.

@mathomp4 mathomp4 added the 0 diff trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) label Apr 25, 2022
@mathomp4 mathomp4 requested a review from a team as a code owner April 25, 2022 13:02
@mathomp4 mathomp4 self-assigned this Apr 25, 2022
@mathomp4 mathomp4 requested a review from dr0cloud April 25, 2022 13:03
Copy link
Collaborator

@dr0cloud dr0cloud left a comment

Choose a reason for hiding this comment

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

Looks fine to me Matt. In the future we will do some generalization to allow easier combinations of multiple radiation codes for LW and SW and perhaps add passive radiation code calls as well. Currently user must make sure that they (1) choose the SAME radiation code for LW and SW in AGCM.rc, (2) make sure NUM_BANDS is correct (at least same for RRTMG and RRTMGP), and (3) make sure they edit the *.j files above to be consistent if RRTMGP LW+SW is chosen. That is fine for the moment. I approve.

@sdrabenh sdrabenh merged commit 1ebc159 into develop May 2, 2022
@sdrabenh sdrabenh deleted the feature/mathomp4/clean-agcm-rc branch May 2, 2022 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants