Skip to content

Commit

Permalink
Addressed comments in first review of PR #131, removed commented out …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
Utheri Wagura authored and Utheri Wagura committed Jan 14, 2025
1 parent 71fdf8c commit 8ade480
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 60 deletions.
37 changes: 19 additions & 18 deletions yamls/NWA12/CEFI_NWA12_cobalt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
# The following yaml is designed to compile and postprocess the ocean_monthly component of the CEFI_NWA12_COBALT_V1 experiment
# Full Documentation is available here: https://noaa-gfdl.github.io/fre-cli/index.html
#
# 0.) Begin by setting up your environment by calling module load fre/2025.01
# 0.) Set up your environment by running "module use -a /ncrc/home2/fms/local/modulefiles" followed by "module load fre/2025.01"
#
# For modularity and compatibility with with cylc workflow engine, fre/2025.01 splits up the compile and post processcing process
# into several sub steps.
#
# COMPILE GUIDE - BAREMETAL RUN
#
# 1.) Create script that will be used to checkout model components
# fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod
# 1.) Create script that will be used to checkout model components and OPTIONALLY run it with the --execute flag. You can manually run the
# checkout script after this step as well
# fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p ncrc5.intel23 -t prod --execute
#
# 2.) Create Makefile
# fre make create-makefile -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod
# fre make create-makefile -y CEFI_NWA12_cobalt.yaml -p ncrc5.intel23 -t prod
#
# 3.) Create script that will compile the model, and OPTIONALLY run it with the --execute flag. You can manually run the
# compile script after this step as well
# fre make create-compile -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod --execute
# fre make create-compile -y CEFI_NWA12_cobalt.yaml -p ncrc5.intel23 -t prod --execute
#
# COMPILE GUIDE - CONTAINERS
#
# 1.) Create checkout script with the "no parallel checkouts option" - this is required for container builds
# fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod --npc
# fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod -npc
#
# 2.) Create Makefile AND a Docker file. You can then build the container by manually running the createContainer.sh
# script, or by OPTIONALLY including the --execute file when creating the container
Expand All @@ -35,33 +36,33 @@
# 0.) Load module on GFDL Analysis: module load fre/2025.01
#
# 1.) Checkout the git repo containing postprocessing scripts and related files with the folowing command:
# fre pp checkout -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
# fre pp checkout -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
#
# 2.) Combine your main yaml and experiment yamls into a single yaml, then set up the cylc-src dir with the configure-yaml command:
# fre yamltools combine-yamls -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod -y CEFI_NWA12_cobalt.yaml
# fre pp configure-yaml -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod -y combined-CEFI_NWA12_COBALT_V1.yaml
# fre yamltools combine-yamls -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod -y CEFI_NWA12_cobalt.yaml
# fre pp configure-yaml -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod -y CEFI_NWA12_cobalt.yaml --use pp
#
# 2a.) fre/2025.01 does not automatically create the pp dir for you, so you will have to mkdir this first to pass the validator:
# mkdir /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel22-prod/pp
# mkdir /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel23-prod/pp
#
# 2b.) (OPTIONAL, BUT RECOMMENDED): Create a list of available tar files within your history tar archives to allow fre to catch a wider variety of errors
# tar -tf /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel22-prod/history/19930101.nc.tar | grep -v tile[2-6] | sort > /home/$USER/cylc-src/CEFI_NWA12_COBALT_V1__gfdl.ncrc5-intel22__prod/history-manifest
# tar -tf /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel23-prod/history/19930101.nc.tar | grep -v tile[2-6] | sort > /home/$USER/cylc-src/CEFI_NWA12_COBALT_V1__gfdl.ncrc5-intel23__prod/history-manifest
#
# 3.) Validate that all configuration files are correct
# fre pp validate -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
# fre pp validate -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
#
# 4.) Create the cylc-run directory containing the final version of configuration files, scripts, and output directories
# fre pp install -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
# fre pp install -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
#
# 5.) Run post processing
# fre pp run -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
# fre pp run -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
#
# 6.) To monitor the status of each post processing step, run the following command:
# fre pp status -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
# fre pp status -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod


fre_properties:
- &FRE_STEM "fre/cefi/NWA/2024_11"
- &FRE_STEM "fre/cefi/NWA/ShortCanopyTest"

- &PP_START_YEAR "1993"
- &PP_END_YEAR "2019"
Expand All @@ -77,8 +78,8 @@ fre_properties:
- &momIncludes "-Imom6/src/MOM6/pkg/CVMix-src/include"
- &sisincludes "-Imom6/src/MOM6/src/framework"
- &MOM6_GIT_FIX "main"
- &FMS_GIT_TAG "2024.01.02"
- &CPL_GIT_TAG "2024.01.02"
- &FMS_GIT_TAG "2024.03"
- &CPL_GIT_TAG "2024.03"
- &INTEL "intel-classic"


Expand Down
35 changes: 21 additions & 14 deletions yamls/NWA12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The latest version of the FMS Runtime Environment uses yamls instead of xmls to

The following sections assume that you are compiling and running experiments on Gaea C5, and then conducting postprocessing on GFDL's PPAN system. The `platforms.yaml` does support compilation on C6, but `bronx-23` does not support containerized runs on C6 - baremetal runs, however, are supported on C6.

Full documentation for `Fre/2025.01` is available [here](https://noaa-gfdl.github.io/fre-cli/usage.html)

## Compile the Experiment.

Begin by loading the appropriate modules on Gaea C5:
Expand All @@ -16,9 +18,10 @@ module load fre/2025.01

### Baremetal Compilation

Run the following command create the script that will be used to checkout the model components:
Run the following command to create the script that will be used to checkout the model components, and optionally run the script by passing in the --execute flag.
If you don't provide the --execute flag, be sure to run the script printed at the end of this command manually.
```
fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p ncrc5.intel23 -t prod
fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p ncrc5.intel23 -t prod --execute
```

Create the Makefile for the experiment:
Expand All @@ -33,10 +36,10 @@ fre make create-compile -y CEFI_NWA12_cobalt.yaml -p ncrc5.intel23 -t prod --exe

### Containerized Compilation

Compiling the experiment into a container is a similar process. The only changes are 1.) passing in the --npc flag during the checkout step to prevent parallel checkouts, 2.) changing you platform to `hpcme.2023` and 3.) creating a Dockerfile and container creation script instead of a compilation script. Note that the Dockerfile will compile the model within the container as part of the build process.
Compiling the experiment into a container is a similar process. The only changes are 1.) passing in the -npc flag during the checkout step to prevent parallel checkouts, 2.) changing you platform to `hpcme.2023` and 3.) creating a Dockerfile and container creation script instead of a compilation script. Note that the Dockerfile will compile the model within the container as part of the build process.

```
fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod --npc
fre make create-checkout -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod -npc
fre make create-makefile -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod
fre make create-dockerfile -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod --execute
```
Expand All @@ -45,6 +48,10 @@ fre make create-dockerfile -y CEFI_NWA12_cobalt.yaml -p hpcme.2023 -t prod --exe

`fre/2025.01` does not currently support running experiments with yamls, so in order to run the compiled experiment in fre, you will have to use the existing xmls along with `fre/bronx`. Make sure the `FRE_STEM` set in the xml matches the `FRE_STEM` set in the experiment yaml.

**NOTE**: Since capitilized names are not allowed in Dockerfiles, the current compile yaml names the compilation experiment `mom6_sis2_generic_4p_compile_symm_yaml` instead of `MOM6_SIS2_GENERIC_4P_compile_symm_yaml` like the xml. As a result, `fre` will print a warning that it cannot find your executable when you run `frerun`, and will eventually fail if you submit the job.

To get around this, change the path set in the `executable` variable within the runscript printed by `frerun` to point to the exectable located in `${FRE_STEM}/mom6_sis2_generic_4p_compile_symm_yaml/exec` instead.

### Baremetal Run

Baremetal experiments can be run using the same run [instructions](https://github.com/NOAA-GFDL/CEFI-regional-MOM6/tree/main/xmls) available in the xmls directory. Be sure to load the modules described in that page before running `frerun`.
Expand All @@ -68,45 +75,45 @@ frerun -x CEFI_NWA12_cobalt.xml -p ncrc5.intel23 -t prod CEFI_NWA12_COBALT_V1 --
Like `fre make`, postprocessing is split into several subcommands to improve modularity. On PPAN, load the appropriate module:
```
module load fre/2025.01
```
``
Checkout the git repo containing postprocessing scripts and related files with the folowing command:
```
fre pp checkout -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
fre pp checkout -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
```
Combine your main yaml and experiment yamls into a single yaml, then set up the cylc-src dir with the configure-yaml command:
```
fre yamltools combine-yamls -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod -y CEFI_NWA12_cobalt.yaml
fre pp configure-yaml -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod -y combined-CEFI_NWA12_COBALT_V1.yaml
fre yamltools combine-yamls -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod -y CEFI_NWA12_cobalt.yaml --use pp
fre pp configure-yaml -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod -y CEFI_NWA12_cobalt.yaml
```
`fre/2025.01` does not automatically create the pp dir for you, so you will have to mkdir this first to pass the validator:
```
mkdir /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel22-prod/pp
mkdir /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel23-prod/pp
```
(OPTIONAL, BUT RECOMMENDED): Create a list of available tar files within your history tar archives to allow fre to catch a wider variety of errors
```
tar -tf /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel22-prod/history/19930101.nc.tar | grep -v tile[2-6] | sort > /home/$USER/cylc-src/CEFI_NWA12_COBALT_V1__gfdl.ncrc5-intel22__prod/history-manifest
tar -tf /archive/$USER/fre/cefi/NWA/2024_06/CEFI_NWA12_COBALT_V1/gfdl.ncrc5-intel23-prod/history/19930101.nc.tar | grep -v tile[2-6] | sort > /home/$USER/cylc-src/CEFI_NWA12_COBALT_V1__gfdl.ncrc5-intel23__prod/history-manifest
```
Validate that all configuration files are correct
```
fre pp validate -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
fre pp validate -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
```
Create the cylc-run directory containing the final version of configuration files, scripts, and output directories
```
fre pp install -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
fre pp install -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
```
Run post processing
```
fre pp run -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
fre pp run -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
```
To monitor the status of each post processing step, run the following command:
```
fre pp status -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel22 -t prod
fre pp status -e CEFI_NWA12_COBALT_V1 -p gfdl.ncrc5-intel23 -t prod
```
32 changes: 4 additions & 28 deletions yamls/NWA12/platforms.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,22 @@
platforms:
- name: ncrc5.intel22
compiler: intel
modulesInit: [" module use -a /ncrc/home2/fms/local/modulefiles \n","source $MODULESHOME/init/sh \n"]
modules: [ !join [*INTEL,"/2022.2.1"],"fre/bronx-22",cray-hdf5, cray-netcdf]
#fc: ftn
#cc: cc
mkTemplate: !join ["/ncrc/home2/fms/local/opt/fre-commands/bronx-22/site/ncrc5/", *INTEL, ".mk" ]
modelRoot: /gpfs/f5/cefi/scratch/Utheri.Wagura/fre/cefi/NWA/Canopy_202412/

- name: ncrc5.intel23
compiler: intel
modulesInit: [" module use -a /ncrc/home2/fms/local/modulefiles \n","source $MODULESHOME/init/sh \n"]
modules: [ !join [*INTEL, "/2023.1.0"],"fre/bronx-22",cray-hdf5, cray-netcdf]
#fc: ftn
#cc: cc
modules: [!join [*INTEL, /2023.2.0], fre/bronx-22, cray-hdf5, cray-netcdf]
mkTemplate: !join ["/ncrc/home2/fms/local/opt/fre-commands/bronx-22/site/ncrc5/", *INTEL, ".mk"]
modelRoot: /gpfs/f5/cefi/scratch/Utheri.Wagura/fre/cefi/NWA/Canopy_202412/

- name: ncrc6.intel22
compiler: intel
modulesInit: [" module use -a /ncrc/home2/fms/local/modulefiles \n","source $MODULESHOME/init/sh \n"]
modules: [ !join [*INTEL,"/2022.2.1"],"fre/bronx-22",cray-hdf5, cray-netcdf]
#fc: ftn
#cc: cc
mkTemplate: !join ["/ncrc/home2/fms/local/opt/fre-commands/bronx-22/site/ncrc6/", *INTEL, ".mk" ]
modelRoot: /gpfs/f6/ira-cefi/scratch/Utheri.Wagura/fre/cefi/NWA/Canopy_202412/
modelRoot: !join ["/gpfs/f5/cefi/scratch/${USER}", "/", *FRE_STEM ]

- name: ncrc6.intel23
compiler: intel
modulesInit: [" module use -a /ncrc/home2/fms/local/modulefiles \n","source $MODULESHOME/init/sh \n"]
modules: [ !join [*INTEL, "/2023.1.0"],"fre/bronx-22",cray-hdf5, cray-netcdf]
#fc: ftn
#cc: cc
modules: [!join [*INTEL, /2023.2.0], fre/bronx-22, cray-hdf5, cray-netcdf]
mkTemplate: !join ["/ncrc/home2/fms/local/opt/fre-commands/bronx-22/site/ncrc6/", *INTEL, ".mk"]
modelRoot: /gpfs/f6/ira-cefi/scratch/Utheri.Wagura/fre/cefi/NWA/Canopy_202412/
modelRoot: !join ["/gpfs/f6/ira-cefi/scratch/${USER}", "/", *FRE_STEM ]

- name: hpcme.2023
compiler: intel
RUNenv: [". /spack/share/spack/setup-env.sh", "spack load libyaml", "spack load [email protected]", "spack load [email protected]"]
modelRoot: /apps
#fc: mpiifort
#cc: mpiicc
container: true
containerBase: "ecpe4s/noaa-intel-prototype:2023.09.25"
containerBuild: "podman"
Expand Down

0 comments on commit 8ade480

Please sign in to comment.