# CESM configurations on Gadi using CIME

**URL:** https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115
**Category:** Earth System
**Tags:** nuopc
**Created:** [7 November 2022 02:01 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115 "2022-11-07T02:01:10Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)
#### Post date: [7 November 2022 02:01 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/1 "2022-11-07T02:01:10Z")

</div>

[CIME](https://esmci.github.io/cime/versions/master/html/index.html) (pronounced “SEAM”) is a Python package for configuring, compiling and running earth system models. It is used by a number of models, including CESM, UFS, HAFS, E3SM and NorESM. Kieran Ricardo and I are currently using CIME on Gadi to run and explore some CESM model configurations that could be helpful for developing the next generation of ACCESS models.

To get CIME working on Gadi, some Gadi specific configuration has been added to forks of various repos. These forks live in the [ACCESS-NRI Github org](https://github.com/ACCESS-NRI). You can clone the ACCESS-NRI CESM fork and dependent repos using:

```auto
git clone -b access-nri-repos git@github.com:ACCESS-NRI/CESM.git
cd CESM
./manage_externals/checkout_externals -v -o

```

This will give you a copy of CESM and CIME to build and run it. For example, to run a CESM model case using DATM, MOM6, CICE6 and SWAV, coupled using NUOPC/CMEPS (note this works best if your default `PROJECT` is `tm70` so that you can use a shared input data directory):

```auto
cd cime/scripts
./create_newcase --case test --compset GMOM_JRA --res T62_g16 --machine gadi
cd test
./case.setup
./case.build
./case.submit

```

(Currently, this case will just execute each model component sequentially on a single node)

---

<div class="post-metadata">

### Author: ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)
#### Post date: [7 November 2022 02:02 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/2 "2022-11-07T02:02:14Z")

</div>

There is also an _officially unsupported_ model configuration using DATM, MOM6, CICE6 and WW3 (i.e. essentially ACCESS-OM3), however I’m currently trying to track down some missing input files to get this running.

---

<div class="post-metadata">

### Author: ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)
#### Post date: [18 November 2022 05:18 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/3 "2022-11-18T05:18:28Z")

</div>

CESM configurations that use NUOPC/CMEPS can also be run from payu. For now, the payu CESM model driver only exists in [a branch in my fork of payu](https://github.com/dougiesquire/payu/tree/cesm_cmeps), so anyone wanting to try this out will have to clone and install that.

Payu configs for a couple of CESM configurations can be found at:

- MOM6-CICE6-DATM-DROF : [GitHub - dougiesquire/gmom\_jra: CESM GMOM\_JRA (MOM6-CICE6-DATM-DROF-SLND-SWAV-SGLC) payu configuration](https://github.com/dougiesquire/gmom_jra)
- MOM6-CICE6-WW3-DATM-DROF : [GitHub - dougiesquire/gmom\_jra\_wd: CESM GMOM\_JRA\_WD (MOM6-CICE6-WW3-DATM-DROF-SLND-SGLC) payu configuration](https://github.com/dougiesquire/gmom_jra_wd)

Be aware, these are untested payu implementations of officially-unsupported CESM configurations. You’re very welcome to give them a spin, but do so at your own risk 🙂

---

<div class="post-metadata">

### Author: ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)
#### Post date: [25 November 2022 05:42 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/4 "2022-11-25T05:42:41Z")

</div>

I’ve also kluged together a CICE6-WW3-DOCN-DATM-DROF CESM executable. Payu config can be found at [GitHub - dougiesquire/d\_jra\_wd: Kluged-together CESM CICE6-WW3-DOCN-DATM-DROF-SLND-SGLC build scripts and payu configuration](https://github.com/dougiesquire/d_jra_wd).

Same warning as above, but even more so since this configuration doesn’t even exist as a compset in CIME.

cc @sofarrell

---

<div class="post-metadata">

### Author: ![Michael\_Barnes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/michael_barnes/32/247_2.png) [@Michael\_Barnes](https://forum.access-hive.org.au/u/Michael_Barnes)
#### Post date: [13 December 2023 04:39 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/5 "2023-12-13T04:39:08Z")

</div>

Hi @dougiesquire. I am new to the CESM community. I am following your above instructions to run a test case. When running “./case.setup”, it wants to create folders (specifically inputdata) in the directory “/g/data/hh5” instead of my /g/data/w40/user directory in which I cloned CESM and ran “.create\_newcase”. Do you perhaps know how to redirect this to the correct directory?

---

<div class="post-metadata">

### Author: ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)
#### Post date: [13 December 2023 05:21 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/6 "2023-12-13T05:21:03Z")

</div>

@Michael_Barnes are you cloning CESM from the ACCESS-NRI org as above? You should be able to change the inputdata location by editing [`DIN_LOC_ROOT` for the `"gadi"` machine in `ccs_config/machines/config_machines.xml` (line 3651)](https://github.com/ACCESS-NRI/ccs_config_cesm/blob/9dd011379064789ca0c4053947b60dfb5fda93d4/machines/config_machines.xml#L3651)

I should emphasise that the ACCESS-NRI forks of CESM and associated repos are not maintained or supported and haven’t been updated in over a year. These were only set up to explore CESM configurations on which the next generation of ACCESS models have been based.

---

<div class="post-metadata">

### Author: ![Michael\_Barnes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/michael_barnes/32/247_2.png) [@Michael\_Barnes](https://forum.access-hive.org.au/u/Michael_Barnes)
#### Post date: [13 December 2023 05:26 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/7 "2023-12-13T05:26:13Z")

</div>

Hi @dougiesquire. Thanks for the info. Yes, I cloned the ACCESS-NRI one. Do you think I should clone CESM directly from UCAR and add in the machine manually rather than cloning the ACCESS-NRI one?

---

<div class="post-metadata">

### Author: ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)
#### Post date: [13 December 2023 21:39 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/8 "2023-12-13T21:39:04Z")

</div>

That will probably make things easiest for you to manage/update going forward. You’ll need to make a few changes across a couple of repos to get things working. I’d suggest:

- Create your own fork of [`ccs_config_cesm`](https://github.com/ESMCI/ccs_config_cesm). Copy the changes made [here](https://github.com/ESMCI/ccs_config_cesm/compare/main...ACCESS-NRI:ccs_config_cesm:gadi-machine-config). Note, it looks like the structure of this repo has changed since those changes were made, but hopefully it’s clear what goes where.
- Create your own fork of [`MOM_interface`](https://github.com/ESCOMP/MOM_interface). Copy the changes made [here](https://github.com/ESCOMP/MOM_interface/compare/main...ACCESS-NRI:MOM_interface:access-nri). Note, no thought has been put into the PE layout on Gadi. Layout specifications were added for the MOM + `"DATM.+CICE.+WW3"` compset, but this just allocates each component 1 node and runs them sequentially. Running other compsets on Gadi will use whatever the default specification is for that compset. Hopefully the changes in the ACCESS-NRI fork on `MOM_interface` at least show how you would configure PE layout for specific compsets if/when you need to.
- Create your own fork of [`CESM`](https://github.com/ESCOMP/CESM). Copy the changes made [here](https://github.com/ESCOMP/CESM/compare/master...ACCESS-NRI:CESM:access-nri-repos) but instead use the forks you made above. You don’t need to worry about the `ParallelIO` repo as the changes we made are now in the main repo.

Hopefully you can then follow the instructions in this topic, but `clone`ing your own `CESM` fork, rather than the ACCESS-NRI one

---

<div class="post-metadata">

### Author: ![Michael\_Barnes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/michael_barnes/32/247_2.png) [@Michael\_Barnes](https://forum.access-hive.org.au/u/Michael_Barnes)
#### Post date: [13 December 2023 23:51 UTC](https://forum.access-hive.org.au/t/cesm-configurations-on-gadi-using-cime/115/9 "2023-12-13T23:51:04Z")

</div>

Thanks so much @dougiesquire!!! I will give this a go.
