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

Add capability for SCAM forcing based on gridded met fields. #595

Closed

Conversation

JulioTBacmeister
Copy link
Collaborator

@JulioTBacmeister JulioTBacmeister commented May 20, 2022

This capability currently requires pre-computed gridded fields on FV latlon 1 degree grid

Have run a number of cases using this capability - can provide user_nl_cam as well path to gridded ERA reanalysis.

Have also run with this capability is off and standard SCAM IOPs. Answers look fine but have not done rigorous testing.

closes #594

@JulioTBacmeister JulioTBacmeister added the enhancement New feature or request label May 21, 2022
@JulioTBacmeister JulioTBacmeister changed the title Add capability for SCAM forcing based on gridded met fields. Connected to issue #594. Add capability for SCAM forcing based on gridded met fields. May 21, 2022
@jtruesdal
Copy link
Collaborator

@JulioTBacmeister could you add @jtruesdal as a developer on your repo if it's OK for me to make changes to this branch for the PR.

@JulioTBacmeister
Copy link
Collaborator Author

@jtruesdal I've made you a collaborator and github implies you should have received an invite of some sort. Let me know if I should do something else.

@peverwhee
Copy link
Collaborator

@JulioTBacmeister @jtruesdal

Jim Edwards came across the following when debugging our CICE/SCAM issues:

Because the namelist variable scm_ana_frc_file_template is a template rather than an actual file, this message appears when you build:

Model cam missing file scm_ana_frc_file_template = '%y/ERAI_fv09_L58.cam2.i.%y-%m-%d-%s.nc'

To avoid this, we may need a change to CAM's buildnml so that this isn't written to the
Buildconf/cam.input_data_list

@JulioTBacmeister
Copy link
Collaborator Author

Yes. I've noticed this message. The model nevertheless builds and runs without issues. This should have also come up when the nudging code was incorporated - it uses a similar template.

@peverwhee
Copy link
Collaborator

Yes. I've noticed this message. The model nevertheless builds and runs without issues. This should have also come up when the nudging code was incorporated - it uses a similar template.

Gotcha. I'll open a low-priority issue for the nudging message.

@peverwhee
Copy link
Collaborator

@JulioTBacmeister @jtruesdal

OK, bringing this up again because it looks like the logic can handle the nudging template file because it does not see it as an absolute path (and thus we do not get the warning). Because of the "%y/" at the start of the scm_ana_frc_file_template file, we get the warning for this new variable.

If you replace line 4405 in bld/build_namelist with the following (to not write the variables whose pathnames start with '%' to the cam.input_data_list file), it should remove the warning:

if (!($pathname =~ '%.*') {
    print $fh "$var = $pathname\n";
}

I'm also happy to make a PR to your branch with this change.

Thanks!

Julio Bacmeister added 2 commits May 27, 2022 16:17
@JulioTBacmeister
Copy link
Collaborator Author

JulioTBacmeister commented May 27, 2022

@peverwhee @jtruesdal - I made the change in build_namelist on my branch and pushed it to origin. Would you check it?

@peverwhee
Copy link
Collaborator

@JulioTBacmeister Looks good to me. Sorry my code snippet was missing a parenthesis! Thanks!

Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

Suggested approach to problem with pathnames.

Comment on lines 5394 to 5398
<entry id="scm_ana_frc_file_template" type="char*128" input_pathname="abs" category="scam"
group="scam_nl" valid_values="" >
template for analysis forcing dataset.
Default: set by build-namelist.
</entry>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This variable is a string, not a filename (path), therefore, it should not have the input_pathname attribute. I believe this is the source of the build-namelist problems.

Comment on lines 4407 to 4408
if (!($pathname =~ '%.*')) {
print $fh "$var = $pathname\n";
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not think this should be needed (see below) and could have unintended effects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should these lines be removed altogether? Or replaced with what was there before?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It should be replaced with what was there before. I opened a PR with the changes if that helps (you can also close it if you don't need it):

JulioTBacmeister#1

Apologies for any whiplash you may be experiencing.

Courtney Peverley and others added 7 commits May 31, 2022 10:11
@JulioTBacmeister
Copy link
Collaborator Author

Removed
cime_config/usermods_dirs/scam_STUB/scripts/make_basecase.auto.csh
cime_config/usermods_dirs/scam_STUB/scripts/run_cases.csh

Not sure what to do with
cime_config/usermods_dirs/scam_STUB/scripts/STUB_iop.nc

Want to note problems with
cime_config/usermods_dirs/scam_STUB/user_nl_cam

Functionality of make_basecase.auto.csh should incorporated somewhere, i,e. new compset, new script like 'create_newcase'

Need for STUB_iop.nc should also be looked at.

@peverwhee
Copy link
Collaborator

@nusbaume @cacraigucar and I recommended (via email) that Julio remove the shell scripts and ncdata file from the scam_STUB usermods directory. Documenting that here.

XML variables set in the shell script(s) can be set in scam_STUB/shell_commands and variables written to user_nl_cam can be added to scam_STUB/user_nl_cam

@cacraigucar
Copy link
Collaborator

@JulioTBacmeister and @adamrher - Is this Stub IOP another IOP which we want to support? If so, I would suggest that the user_nl_cam and shell_commands be put in cime_config/usermods_dirs/scam_Stub_IOP or something like that. You can see what was done for cime_config/usermods_dirs/scam_arm97 as an example. @jtruesdal may be able to give some addtional guidance as he's done this more recently than I have.

@jtruesdal
Copy link
Collaborator

@cacraigucar I agree that this needs to be looked at and will meet with Julio to discuss options.

Comment on lines +24 to +33
protocol = svn
repo_url = https://github.com/larson-group/clubb_release/tags/
tag = clubb_4ncar_20220311_f51de38/src/CLUBB_core
required = True

[silhs]
local_path = src/physics/silhs
protocol = git
repo_url = https://github.com/ESCOMP/SILHS_CESM
tag = silhs_clubb_release_b76a124_20200220_c20200320
protocol = svn
repo_url = https://github.com/larson-group/clubb_release/tags/
tag = clubb_4ncar_20220311_f51de38/src/SILHS
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JulioTBacmeister - Are these changes really needed for your SCAM PR? Hopefully you can use the tags that are currently being used in CAM instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I want to use the "new" CLUBB external brought in with cam6_3_059. This is so that we can assess prognostic momentum transport using SCAM.

@JulioTBacmeister
Copy link
Collaborator Author

Superseded by PR #628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants