diff --git a/fre/run/tests/yaml/input_datasets.yaml b/fre/run/tests/yaml/input_datasets.yaml new file mode 100644 index 000000000..5dd36e9d1 --- /dev/null +++ b/fre/run/tests/yaml/input_datasets.yaml @@ -0,0 +1,28 @@ +input: + datasets: + common_LM4_ex1: + - label: input + target: INPUT/soil_type.nc + chksum: '' + timestamp: '' + platform: {{ platform }} + source: /some/path/soil_type.nc + - label: input + target: INPUT/ + chksum: '' + timestamp: '' + platform: {{ platform }} + source: /some/path/biodata.nc + common_LM4_ex2: + - label: input + target: INPUT/soil_type.nc + chksum: '' + timestamp: '' + platform: {{ platform }} + source: /some/path/soil_type_gsde_5minute.nc + - label: input + target: INPUT/ + chksum: '' + timestamp: '' + platform: {{ platform }} + source: /some/path/biodata.nc diff --git a/fre/run/tests/yaml/layouts.yaml b/fre/run/tests/yaml/layouts.yaml new file mode 100644 index 000000000..f97dfb6ca --- /dev/null +++ b/fre/run/tests/yaml/layouts.yaml @@ -0,0 +1,8 @@ +layouts: + c96L65_ex_production: + job_wallclock: '16:00:00' + seg_runtime: '3:00:00' + atm: {ranks: '576', threads: null, layout: 4,24, io_layout: 1,4, mask_table: null} + lnd: {ranks: null, threads: null, layout: 4,24, io_layout: 1,4, mask_table: null} + ocn: {ranks: '0', threads: null, layout: 96,6, io_layout: 1,3, mask_table: null} + ice: {ranks: null, threads: null, layout: 96,6, io_layout: 1,3, mask_table: null} diff --git a/fre/run/tests/yaml/model.yaml b/fre/run/tests/yaml/model.yaml new file mode 100644 index 000000000..6d957fb39 --- /dev/null +++ b/fre/run/tests/yaml/model.yaml @@ -0,0 +1,36 @@ +#Potential process for combining: +# 1. model, settings, layouts, datasets, experiment yamls combined +# 2. experiment yaml references bits in layouts and datasets +# 3. layouts and datasets are cleaned out (all of them are not needed and makes the final config giant) + +fre_properties: + shared_yamls: + - "run/layouts.yaml" + - "run/input_datasets.yaml" + shared_nml: + - "$(includeDir)/nml/ocean_g12.nml" + - "$(includeDir)/nml/am5_common.nml" + - "$(includeDir)/nml/lm4p2_common.nml" + - "$(includeDir)/nml/am5_c96L65.nml" + - "$(includeDir)/nml/am5_amip.nml" + +build: + compile: "compile.yaml" + platform: "platforms.yaml" + +experiments: + foo_experiment: + settings: "settings.yaml" + run: + - "{{ fre_properties.shared_yamls }}" + - "run/exp.yaml" + postprocess: + - "pp1.yaml" + analysis: + - "analysis1.yaml" + +# Though it may seems repetitive, I personally like the "run", "pp", "analysis", and "settings" keys +# 1. more explicit +# 2. easy to flatten +# 3. probably easier if user just wants postprocessing yamls (if on ppan) or no post-processing (just on gaea) +# 4. easier to see/manage the order yamls are combined (if order matters in some cases) diff --git a/fre/run/tests/yaml/platforms.yaml b/fre/run/tests/yaml/platforms.yaml new file mode 100644 index 000000000..0cbe9cb79 --- /dev/null +++ b/fre/run/tests/yaml/platforms.yaml @@ -0,0 +1,23 @@ +platforms: + - name: ncrc5.intel23 + compiler: intel + envSetup: ["module use -a /ncrc/home2/fms/local/modulefiles", + "source $MODULESHOME/init/sh", + !join ["module load ", *INTEL, "/2023.2.0"], + "module load fre/bronx-23", + "module load cray-hdf5/1.12.2.11", + "module load cray-netcdf/4.9.0.11"] + mkTemplate: !join ["/ncrc/home2/fms/local/opt/fre-commands/bronx-20/site/ncrc5/", *INTEL, ".mk"] + modelRoot: ${HOME}/fremake_canopy/test + - name: hpcme.intel25 + compiler: intel + RUNenv: "" + modelRoot: /apps + container: True + containerBuild: "podman" + containerRun: "apptainer" + containerBase: "gitlab.gfdl.noaa.gov:5050/fre/hpc-me/base-ubuntu24.04-intel:2025.3" + mkTemplate: "/apps/mkmf/templates/hpcme-intel2025.03-oneapi.mk" + container2step: True + container2base: "gitlab.gfdl.noaa.gov:5050/fre/hpc-me/base-ubuntu24.04-intel:2025.3rte" + volume: *VOLUME diff --git a/fre/run/tests/yaml/run_exp/experiment.yaml b/fre/run/tests/yaml/run_exp/experiment.yaml new file mode 100644 index 000000000..637023e10 --- /dev/null +++ b/fre/run/tests/yaml/run_exp/experiment.yaml @@ -0,0 +1,18 @@ +## could include namelist info, dataset info, mode info + +run: + inputs: + namelist: + atmos_nml: "have to figure this one out" + files: {{ fre_properties.shared_nml }} + datasets: ## reference specific sections of input.yaml[datasets] + common_LM4p2: '{{ input.datasets.common_LM4_ex1 }}' + runtime_mode: + production: + simtime: $(EXP_AMIP_LEN) + simtime_units: years + segment_simtime: '12' #could just be P12M + segment_simtime_units: months + layouts: + c96L65_ex_production: '{{ layouts.c96L65_ex_production}}' +#to-do: add regression example? diff --git a/fre/run/tests/yaml/run_exp/settings.yaml b/fre/run/tests/yaml/run_exp/settings.yaml new file mode 100644 index 000000000..5d40510cc --- /dev/null +++ b/fre/run/tests/yaml/run_exp/settings.yaml @@ -0,0 +1,8 @@ +run: + workflow: + repository: "some_url.git" + version: "main" + settings: + site: "gaea" + switches: + clean_work: True