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

Build error due to blom user namelist #618

Closed
adagj opened this issue Dec 11, 2024 · 6 comments
Closed

Build error due to blom user namelist #618

adagj opened this issue Dec 11, 2024 · 6 comments
Assignees

Comments

@adagj
Copy link
Contributor

adagj commented Dec 11, 2024

Hi,
I was trying to build a noresm2.0.9 case on betzy, and encountered this error:

Traceback (most recent call last): File "/cluster/projects/nn10013k/adagj/NorESM/cases/NCO2x4_AHT_f19_tn14_20241211/./case.build", line 148, in <module> _main_func(__doc__) File "/cluster/projects/nn10013k/adagj/NorESM/cases/NCO2x4_AHT_f19_tn14_20241211/./case.build", line 141, in _main_func success = build.case_build(caseroot, case=case, sharedlib_only=sharedlib_only, File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/build.py", line 570, in case_build return run_and_log_case_status(functor, "case.build", caseroot=caseroot) File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/utils.py", line 1663, in run_and_log_case_status rv = func() File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/build.py", line 568, in <lambda> functor = lambda: _case_build_impl(caseroot, case, sharedlib_only, model_only, buildlist, File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/build.py", line 511, in _case_build_impl sharedpath = _build_checks(case, build_threaded, comp_interface, File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/build.py", line 204, in _build_checks case.create_namelists() File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/case/preview_namelists.py", line 88, in create_namelists run_sub_or_cmd(cmd, (caseroot), "buildnml", (self, caseroot, compname), case=self) File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/cime/scripts/Tools/../../scripts/lib/CIME/utils.py", line 345, in run_sub_or_cmd getattr(mod, subname)(*subargs) File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/components/blom//cime_config/buildnml", line 165, in buildnml pg_blom.append_user_nl_file(user_nl_file) File "/cluster/projects/nn10013k/adagj/NorESM/noresm2.0.9_20241211/components/blom/cime_config/ocn_in_paramgen.py", line 1461, in append_user_nl_file raise OcnInParamGenError(emsg.format(user_nl_file, line)) ocn_in_paramgen.OcnInParamGenError: Cannot parse the following line in '/cluster/projects/nn10013k/adagj/NorESM/cases/NCO2x4_AHT_f19_tn14_20241211/user_nl_blom' : '#---------------------------------------------------------------------------------- '

The problem seems to be related to the # used for commenting out text in user_nl_blom. When I changed all the # to !, the case was building just fine. I have not encounter this problem before on betzy.

@TomasTorsvik
Copy link
Contributor

@adagj - this change was introduced in BLOM PR #263 as part of switching to python based scripts, and was introduced as default in NorESM2.0.8.

As you have noticed, this means that user_nl_blom files created for versions earlier than 2.0.8 will need to be changed to work with the new scripts. In addition to changing comments # to !, the variable definition format changed from

set <variable> <value>

to

<variable> <value>

@JorgSchwinger
Copy link
Contributor

More precisely it needs to be

<variable> = <value>

i.e. it is now the normal fortran namelyst syntax

@TomasTorsvik
Copy link
Contributor

Maybe it would make sense to include a more informative error message if someone tries to use an old format user_nl_blom file in the new system. I can have a look at this.

@adagj
Copy link
Contributor Author

adagj commented Dec 12, 2024

Yes, at least it should be documented somewhere. I guess more than me copies our favorite user_nl_blom to new cases :)
I'll close this issue.

@JorgSchwinger
Copy link
Contributor

@adagj

I assume that you were using the blom user namelist to reduce the BLOM output? Be aware that there are other changes and also quite a few new output variables. So if you intend to switch off, for example, the daily output you would need to add these new variables.

I have made a new user_nl_blom file for reduced BLOM output that switches off daily output, switches off output on isopycnic levels, and strongly reduces monthly 3d output. This can be easily adjusted to other needs. You can find the file here:

/cluster/projects/nn2345k/schwinger/cases/user_nl_blom_outvol_reduced_2.0.9

We will implement a nicer solution hopefully soon...

@adagj
Copy link
Contributor Author

adagj commented Dec 13, 2024

@JorgSchwinger Yes, you are right. Super that you have made a new file, I will definitely use it :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants