-
Notifications
You must be signed in to change notification settings - Fork 8
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
Move file stageing #10
base: main
Are you sure you want to change the base?
Conversation
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.
The ww3_grid
executable gets built at the buildlib
stage. If file staging gets moved from buildlib
to buildnml
and if the user attempts to, say, run ./preview_namelists
before running ./case.build
this change will lead to a failure due to the absence of ww3_grid
executable, I think.
See buildnml line 222. Running buildnml before buildlib will print a warning about the missing executable but will no longer fail. |
I am confused about the "resolve git issue" commit that was just pushed. It appears to change the WW3 submodule hash (why?) and when I click on the new submodule, GitHub displays: "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository." |
I tried to undo that but had the same problem. I don't think that it matters because the submodule will need to be updated again when this is merged. |
The issue persists. When I create a test from scratch, buildnml doesn't generate or copy the ww3.mod_def file, causing the run to fail. |
cime_config/buildnml
Outdated
safe_copy(os.path.join(input_dir, filename), os.path.join(output_dir, filename)) | ||
|
||
# Create mod_def file using ww3_grid and the grid_input files | ||
run_cmd("ww3_grid", from_dir=output_dir) |
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.
Modifying this line as follows should fix this PR:
run_cmd("./ww3_grid > mod_def.ww3.log", from_dir=output_dir)
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.
Better yet, I suggest replacing lines 218-223 with the following:
if os.path.isfile(os.path.join(output_dir,"ww3_grid")):
run_cmd("./ww3_grid > mod_def.ww3.log", from_dir=output_dir)
if not os.path.isfile(os.path.join(output_dir,"mod_def.ww3")):
raise RuntimeError("mod_def.ww3 was not created, check mod_def.ww3.log for errors.")
shutil.move(os.path.join(output_dir,"mod_def.ww3"), os.path.join(rundir, "mod_def.ww3"))
else:
logger.warning("ww3_grid file not found. The mod_def.ww3 file will be created after the build phase.")
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.
Actually, even these changes don't fix the issue with TEST runs. It appears like, when you run a TEST case, the buildnml script doesn't get called in between build and run phases. And so the mod_def file never gets created in a TEST run.
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.
I have found the toggle to skip the pnl in tests and am testing a change to unset this when ww3 is in the compset.
I was able to reproduce the issue, I'll work on it this morning. |
I've added a fix to my cime branch in ESMCI/cime#4689
|
Just confirming that this CIME mod, along with the changes I suggest above, fixed the issue. |
I've added you to my fork, please feel free to push your additional changes. |
Done. |
Move file staging from buildlib to buildnml.
Tested using ERR_Ld5.ne30pg3_t232_wg37.1850_CAM70%LT_CLM60%BGC-CROP_CICE_MOM6_MOSART_DGLC%NOEVOLVE_WW3.derecho_intel
Fixes #9
Mvertens would like to review @alperaltuntas can you add her?