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 CIME compliance #20

Open
platipodium opened this issue Jan 20, 2023 · 11 comments
Open

Add CIME compliance #20

platipodium opened this issue Jan 20, 2023 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@platipodium
Copy link
Member

This issue describes efforts to integrate SCHISM in CIME, needed for CEMS

@platipodium platipodium added the enhancement New feature or request label Jan 20, 2023
@platipodium platipodium self-assigned this Jan 20, 2023
@platipodium
Copy link
Member Author

Mariana Vertenstein forked this repo to https://github.com/mvertens/schism-esmf.git and added a branch feature/cime_compliance

@platipodium
Copy link
Member Author

In CESM itself, there are changes necessary in several places.

To facilitate the downloads, there is a new section in ./Externals.cfg

[schism]
#tag = ???
branch = feature/cime_compliance
protocol = git
repo_url = https://github.com/mvertens/schism-esmf.git
local_path = components/schism
externals = Externals.cfg
required = True

@platipodium
Copy link
Member Author

Also the [cime] and [ccs_config] need to be updated in CESM/Externals.cfg to point to the development locations

[cime]
#tag = cime6.0.82
branch = feature/add_schism
protocol = git
repo_url = https://github.com/mvertens/cime
local_path = cime
required = True
[ccs_config]
tag = ccs_config_cesm0.0.49
protocol = git
repo_url = https://github.com/ESMCI/ccs_config_cesm.git
local_path = ccs_config
required = True

@platipodium
Copy link
Member Author

In the cime repository, all NEMO entries have to be replicated with SCHISM in data/config/cesm/config_files.xml

@platipodium
Copy link
Member Author

In the ccs_config repository, we have to change

  1. component_grids_nuopc.xml, adding an entry like
+
+  <domain name="rsfb">
+    <!-- null grid -->
+    <nx>0</nx> <ny>0</ny>
+    <mesh>unset</mesh>
+    <desc>will be done online</desc>
+  </domain>
  1. machines/config_machines.xml, adding, e.g. a conda machine modelled on the existing home-brew entry with one line changed:
    <environment_variables>
      <env name="NETCDF_PATH">$ENV{CONDA_PREFIX}</env>
   </environment_variables>
  1. modelgrid_aliases_nuopc.xml, adding a simple entry
<model_grid alias="TL319_rsfb" >
 <grid name="atm">TL319</grid>
 <grid name="ocnice">rsfb</grid>
</model_grid>

@platipodium
Copy link
Member Author

Next steps are:

  1. fill in buildnml in components/schism/cime_config`
  2. fill in buildlib in components/schism/cime_config`

Next steps for cmeps compliance:

  1. determine if liaises are needed for the fields exported by schism and imported by schism in components/cmeps/mediator/fd_cesm.yaml

@platipodium
Copy link
Member Author

Steps to reproduce:

git clone  https://github.com/mvertens/cesm.git
cd cesm
git checkout feature/add_schism
./manage_externals/checkout_externals -v -o
cd components/schism

cd ../../cime/scripts
./create_newcase --case test_schism --res TL319_rsfb --compset CSCHISM --run-unsupported --machine conda

After the case is created, we need to execute ./case.build and ./case.deploy, but fore, we need to fill in cime_config/buildlib and cime_config/buildnml ...

@mvertens
Copy link

@platipodium thanks for writing up the summary. Actually itscase.submitnot case.deploy. Finally, there are some additions to the cap that will need to be made to recognize stop and restart signals from the driver level. But this will only need to be done once the above steps are completed.

@platipodium
Copy link
Member Author

I have looked into the buildnml script. Not very accessible. Is there documentation available on it?

@mvertens
Copy link

So the buildnml is very model specific. The reason that there is not a lot of documentation for this is that it has not been common to bring in new components into the CIME infrastructure. But hopefully this is changing!

I'm not sure which script you looked at. Most of the CESM/E3SM components use the nmlgen functionality in CIME. This is $SRCROOT/cime/CIME/nmlgen.py and all of the CDEPS components utilize it. There is also new functionality ParamGen ($SRCROOT/cime/CIME/ParamGen) - that MOM6 uses and has a nice jupyter notebooks that you can look at. If you want to see how NEMO has implemented the buildnml and buildlib. This will be public later today - so I'll send you a pointer to it. Also - I will be running a workshop in Bologna the next two days - but should be free later this week to help some more.
So

@mvertens
Copy link

To see the NEMO cime_config files used at CMCC - have a look at https://github.com/CMCC-Foundation/NEMO-CESM/cime_config later today. It should be public.

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
None yet
Development

No branches or pull requests

2 participants