Skip to content

Commit 39f35f8

Browse files
authored
Multiple fixes, save_restart, abandon sles12, another example in the documentation (#516)
* dataatm fix * update EVA plots for sea-ice increments * background filters for insitu obs * fix for missing output obs and EVA to be executed on compute nodes * fix for history output shenanigans * messy task * save restart and increments to R2D2 folder * don't use _rst for forecast begin time * take out sles12 instruction * add new example for 3dfgat_cycle * special handling for mom6_increment * eva fixes for sea ice domain * bye bye sles12 * code_tests related fixes * fix unused variables * use spack v1.9 for py_lmod * fix uv instructions * save diag outputs while cycling * fix sea-ice increments * update docu file * None perhost fix
1 parent 51d1aa7 commit 39f35f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+717
-412
lines changed
186 KB
Loading
129 KB
Loading
315 KB
Loading

docs/_sidebar.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
- [Monitoring an experiment](monitoring_an_experiment.md)
88
- [Manually running tasks](manually_running_tasks.md)
99

10-
1110
- Platform specific instructions
1211

1312
- [Platforms](platforms/platforms.md)
1413
- **Discover**
15-
- [Installing Swell on SLES12](platforms/discover/installing_swell_discover_sles12.md)
1614
- [Installing Swell on SLES15](platforms/discover/installing_swell_discover_sles15.md)
1715
- [Installing Swell using `uv` and `venv`](platforms/discover/installing_swell_uv_venv.md)
1816
- [Configuring `cylc`](platforms/discover/configuring_cylc_discover.md)
@@ -22,6 +20,7 @@
2220
- [Description](examples/description.md)
2321
- **SOCA**
2422
- [3DVAR](examples/soca/3dvar.md)
23+
- [3DFGAT_cycle](examples/soca/3dfgat_cycle.md)
2524

2625
- Configuration files in swell
2726

@@ -30,19 +29,13 @@
3029
- Model configuration:
3130
- [CICE6](configs/model_configurations/cice6.md)
3231
- [MOM6](configs/model_configurations/mom6.md)
33-
- [MOM6](configs/model_configurations/history_outputs.md)
34-
35-
- Tasks
36-
37-
- [Task infrastructure](task_infrastructure.md)
38-
- [Tasks](tasks.md)
32+
- [History Outputs](configs/model_configurations/history_outputs.md)
3933

4034
- Code test before pull request
4135

4236
- [Code Tests](code_tests/code_tests.md)
4337
- [Suite Tests](code_tests/suite_tests.md)
4438

45-
4639
- Governance
4740

4841
- [Requirements](requirements.md)

docs/code_tests/code_tests.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Here are a few steps the CI test will run online after your PR, but it can be easier if you run on your terminal before hand.
44

5-
- Python coding norms: run `python pycodestyle_run.py` at your swell root directory and resolve potential code style issues
5+
- Python coding norms: run `python pycodestyle_run.py` at your swell root directory and resolve potential code style issues.
66

7-
- Code test: run `swell test code_tests`.
8-
- The `swell/test/code_tests/code_tests.py` will test unused variables.
9-
- If you get `assert tq_dicts_rc == 0; AssertionError`, that means your `tasks/task_questions.yaml` source code needs to be updated with the regenerated yaml file, e.g., named `/tmp/task_questions_RKznhVXN.yaml` (see NOTE). If you do not see the print-out information following the error code, check
10-
Line 28 of `swell/test/code_tests/code_tests.py`, which may read `os.environ["LOG_INFO"] = "0" # Set this to 1 when errors are being debugged `. Set its value to `1`, rebuild swell, and run again `swell test code_tests`.
7+
- Code test: after loading SWELL as a module, run `swell test code_tests` command. The `swell/test/code_tests/code_tests.py` will test multiple code tests, which are subject to change over time.
8+
Say you received `assert tq_dicts_rc == 0; AssertionError`, that means your `tasks/task_questions.yaml` source code needs to be updated with the regenerated yaml file, e.g., named `/tmp/task_questions_RKznhVXN.yaml` (see NOTE).
9+
10+
If you do not see the print-out information following the error code this could be due to `LOGLEVEL` is set to `WARNING` by default. See
11+
line 32 of `swell/test/code_tests/code_tests.py`, which reads `os.environ.setdefault("LOGLEVEL", "WARNING")`. To debug, set the `LOGLEVEL` environment value to `DEBUG` and run `swell test code_tests` again, this time more details will be provided regarding the failed tests.
1112
- NOTE: `/tmp` here will be different depending on your environment, following the semantics of Python's [`tempfile.gettempdir()`](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir)

docs/configs/model_configurations/history_outputs.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ background:
1616
ocn_filename: MOM6.res.20210702T030000Z.nc
1717
read_from_file: 1
1818
state variables:
19-
- cicen
20-
- hicen
21-
- hsnon
22-
- socn
23-
- tocn
24-
- ssh
25-
- hocn
26-
- mld
27-
- layer_depth
19+
- sea_ice_area_fraction
20+
- sea_ice_thickness
21+
- sea_ice_snow_thickness
22+
- sea_water_salinity
23+
- sea_water_potential_temperature
24+
- sea_surface_height_above_geoid
25+
- sea_water_cell_thickness
26+
- ocean_mixed_layer_thickness
27+
- sea_water_depth
2828
```
2929
3030
and ocean and sea-ice states:
Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,67 @@
1-
# MOM6 Settings for GEOS/SOCA Setup (GEOSv11.6)
1+
# MOM6 Settings for GEOS/SOCA Setup (GEOSgcm v11.6.0)
22

33

4-
## History Outputs
4+
## History Outputs (`diag_table`)
55

66
>In SWELL, history outputs are utilized to obtain the aggregated variables in desired output frequencies. See more details about [history outputs](history_outputs.md).
77
8-
TODO: `diag_table`
8+
`diag_table` for SOCA is defined as below, which are the prognostic and diagnostic ocean fields required for SOCA applications to work. This particular setup spits out 3-hourly history outputs but users can experiment with different values.
9+
10+
```fortran
11+
ocean_da
12+
1970 1 1 0 0 0
13+
14+
##############################################
15+
"his%4yr%2mo%2dy%2hr", 3, "hours", 1, "hours", "time", 3, "hours", "1901 1 1 0 0 0"
16+
##############################################
17+
18+
# "module_name","field_name","output_name","file_name","time_sampling","reduction_method","regional_section", packing
19+
#===============================================
20+
"ocean_model", "geolon", "geolon", "his%4yr%2mo%2dy%2hr", "all", "none", "none", 2
21+
"ocean_model", "geolat", "geolat", "his%4yr%2mo%2dy%2hr", "all", "none", "none", 2
22+
#===============================================
23+
"ocean_model", "SSH", "ave_ssh", "his%4yr%2mo%2dy%2hr","all", "none","none",2
24+
"ocean_model", "MLD_0125", "MLD", "his%4yr%2mo%2dy%2hr","all",none,"none",2
25+
#===============================================
26+
"ocean_model","u","u" ,"his%4yr%2mo%2dy%2hr","all",.false.,"none",2
27+
"ocean_model","v","v" ,"his%4yr%2mo%2dy%2hr","all",.false.,"none",2
28+
"ocean_model","salt","Salt" ,"his%4yr%2mo%2dy%2hr","all",.false.,"none",2
29+
"ocean_model","temp","Temp" ,"his%4yr%2mo%2dy%2hr","all",.false.,"none",2
30+
"ocean_model","h","h" ,"his%4yr%2mo%2dy%2hr","all",.false.,"none",2
31+
#===============================================
32+
```
33+
34+
## Incremental Analysis Update (IAU) with `MOM_oda_incupd`
35+
36+
`MOM_oda_incupd` is a module that stands for Ocean Data Assimilation (DA) incremental update. This is similar to other
37+
modules that are located in `MOM_input` and currently handled as an extra file in the experiment directory. It divides increment files into smaller, linear segments. For example, if the model step is 900 seconds and `ODA_INCUPD_NHOURS` is set to 3 hours, the increments will be divided by 12 and applied to the state over 12 time steps.
38+
39+
In GEOS and SWELL context it needs to be included in the GEOS experiment folder. For it to be active, `ODA_INCUPD` should ne set as `True`. `ODA_INCUPD_FILE` name shouldn't be changed as that is also used in SWELL. `ODA_INCUPD_UV` is set to false for
40+
now until horizontal surface current fields are assimilated. In terms of `ODA_INCUPD_NHOURS`, there is no set rule but we aim
41+
for half DA window length.
42+
43+
```fortran
44+
! === module MOM_oda_incupd ===
45+
ODA_INCUPD = True ! [Boolean] default = False
46+
! If true, oda incremental updates will be applied
47+
! everywhere in the domain.
48+
ODA_INCUPD_FILE = "mom6_increment.nc" ! The name of the file with the T,S,h increments.
49+
50+
ODA_TEMPINC_VAR = "Temp" ! default = "ptemp_inc"
51+
! The name of the potential temperature inc. variable in
52+
! ODA_INCUPD_FILE.
53+
ODA_SALTINC_VAR = "Salt" ! default = "sal_inc"
54+
! The name of the salinity inc. variable in
55+
! ODA_INCUPD_FILE.
56+
ODA_THK_VAR = "h" ! default = "h"
57+
! The name of the int. depth inc. variable in
58+
! ODA_INCUPD_FILE.
59+
ODA_INCUPD_UV = false !
60+
ODA_UINC_VAR = "u" ! default = "u_inc"
61+
! The name of the zonal vel. inc. variable in
62+
! ODA_INCUPD_UV_FILE.
63+
ODA_VINC_VAR = "v" ! default = "v_inc"
64+
! The name of the meridional vel. inc. variable in
65+
! ODA_INCUPD_UV_FILE.
66+
ODA_INCUPD_NHOURS = 3.0 ! default=3.0
67+
```

docs/configs/slurm_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sbatch ... --account=x1234 --nodes=1 --qos=allqueues --no-requeue
2323

2424
Note that the slurm directives such as `--no-requeue` take no arguments, so it was set to `''`. This is a Cylc reqirement for their SLURM directives handling. More details on this can be seen in their documentation [here](https://cylc.github.io/cylc-doc/stable/html/user-guide/task-implementation/job-submission.html#directives-section-quirks-pbs-sge).
2525

26-
Since there are a few SLURM directives that are platform specific, they are stored under `deployment/platforms/{platform_name}/slurm.yaml`. For instance, requested nodes are `constraint: cas` for `nccs_discover` and `constraint: mil` for `nccs_discover_sles15`.
26+
Since there are a few SLURM directives that are platform specific, they are stored under `deployment/platforms/{platform_name}/slurm.yaml`. For instance, requested nodes are `constraint: cas` for `nccs_discover_cascade` and `constraint: mil` for `nccs_discover_sles15`.
2727

2828
All `sbatch` directives are supported (see [`man sbatch`](https://slurm.schedmd.com/sbatch.html)).
2929
However, note that SWELL will only validate that a given directive exists; we do not validate data types, or do anything fancy with type conversion (e.g., concatenation of arrays).

0 commit comments

Comments
 (0)