forked from ufs-community/uwtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UW-608 filter_topo driver (ufs-community#510)
- Loading branch information
1 parent
71bf1e8
commit 7646f58
Showing
75 changed files
with
1,073 additions
and
774 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
``uwtools.api.filter_topo`` | ||
=========================== | ||
|
||
.. automodule:: uwtools.api.filter_topo | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ API | |
config | ||
esg_grid | ||
file | ||
filter_topo | ||
fv3 | ||
global_equiv_resol | ||
jedi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
``filter_topo`` | ||
=============== | ||
|
||
The ``uw`` mode for configuring and running the UFS Utils preprocessing component ``filter_topo``. Documentation for this UFS Utils component is :ufs-utils:`here <filter-topo>`. | ||
|
||
.. literalinclude:: filter_topo/help.cmd | ||
:language: text | ||
:emphasize-lines: 1 | ||
.. literalinclude:: filter_topo/help.out | ||
:language: text | ||
|
||
All tasks take the same arguments. For example: | ||
|
||
.. literalinclude:: filter_topo/run-help.cmd | ||
:language: text | ||
:emphasize-lines: 1 | ||
.. literalinclude:: filter_topo/run-help.out | ||
:language: text | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
The examples use a configuration file named ``config.yaml`` with contents similar to: | ||
|
||
.. highlight:: yaml | ||
.. literalinclude:: /shared/filter_topo.yaml | ||
|
||
Its contents are described in section :ref:`filter_topo_yaml`. | ||
|
||
* Run ``filter_topo`` on an interactive node | ||
|
||
.. code-block:: text | ||
$ uw filter_topo run --config-file config.yaml | ||
The driver creates a ``runscript.filter_topo`` file in the directory specified by ``run_dir:`` in the config and runs it, executing ``filter_topo``. | ||
|
||
* Run ``filter_topo`` via a batch job | ||
|
||
.. code-block:: text | ||
$ uw filter_topo run --config-file config.yaml --batch | ||
The driver creates a ``runscript.filter_topo`` file in the directory specified by ``run_dir:`` in the config and submits it to the batch system. Running with ``--batch`` requires a correctly configured ``platform:`` block in ``config.yaml``, as well as appropriate settings in the ``execution:`` block under ``filter_topo:``. | ||
|
||
* Specifying the ``--dry-run`` flag results in the driver logging messages about actions it would have taken, without actually taking any. | ||
|
||
.. code-block:: text | ||
$ uw filter_topo run --config-file config.yaml --batch --dry-run | ||
.. include:: /shared/key_path.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../Makefile.outputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw filter_topo --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
usage: uw filter_topo [-h] [--version] TASK ... | ||
|
||
Execute filter_topo tasks | ||
|
||
Optional arguments: | ||
-h, --help | ||
Show help and exit | ||
--version | ||
Show version info and exit | ||
|
||
Positional arguments: | ||
TASK | ||
input_grid_file | ||
The input grid file | ||
namelist_file | ||
The namelist file | ||
provisioned_run_directory | ||
Run directory provisioned with all required content | ||
run | ||
A run | ||
runscript | ||
The runscript | ||
validate | ||
Validate the UW driver config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw filter_topo run --help |
26 changes: 26 additions & 0 deletions
26
docs/sections/user_guide/cli/drivers/filter_topo/run-help.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
usage: uw filter_topo run [-h] [--version] [--config-file PATH] [--batch] | ||
[--dry-run] [--graph-file PATH] | ||
[--key-path KEY[.KEY...]] [--quiet] [--verbose] | ||
|
||
A run | ||
|
||
Optional arguments: | ||
-h, --help | ||
Show help and exit | ||
--version | ||
Show version info and exit | ||
--config-file PATH, -c PATH | ||
Path to UW YAML config file (default: read from stdin) | ||
--batch | ||
Submit run to batch scheduler | ||
--dry-run | ||
Only log info, making no changes | ||
--graph-file PATH | ||
Path to Graphviz DOT output [experimental] | ||
--key-path KEY[.KEY...] | ||
Dot-separated path of keys leading through the config to the driver's | ||
configuration block | ||
--quiet, -q | ||
Print no logging messages | ||
--verbose, -v | ||
Print all logging messages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ Drivers | |
|
||
chgres_cube | ||
esg_grid | ||
filter_topo | ||
fv3 | ||
global_equiv_resol | ||
jedi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config.yaml | ||
runscript.make_hgrid |
5 changes: 5 additions & 0 deletions
5
docs/sections/user_guide/cli/drivers/make_hgrid/runscript.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rm -f runscript.make_hgrid | ||
base=../../../../../shared/make_hgrid.yaml | ||
echo "make_hgrid: {run_dir: $PWD}" | uw config realize --input-file $base --update-format yaml --output-file config.yaml | ||
uw make_hgrid runscript --config-file config.yaml 2>/dev/null | ||
cat runscript.make_hgrid |
4 changes: 4 additions & 0 deletions
4
docs/sections/user_guide/cli/drivers/make_hgrid/runscript.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
time /path/to/make_hgrid --do_schmidt --great_circle_algorithm --grid_name C96_foo --grid_type gnomonic_ed --halo 1 --iend_nest 87 --istart_nest 10 --jend_nest 78 --jstart_nest 19 --nest_grids 1 --nlon 192 --parent_tile 6 --refine_ratio 2 --stretch_factor 1.0001 --target_lat 38.5 --target_lon -97.5 | ||
test $? -eq 0 && touch runscript.make_hgrid.done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
docs/sections/user_guide/cli/drivers/make_solo_mosaic/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config.yaml | ||
runscript.make_solo_mosaic |
5 changes: 5 additions & 0 deletions
5
docs/sections/user_guide/cli/drivers/make_solo_mosaic/runscript.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rm -f runscript.make_solo_mosaic | ||
base=../../../../../shared/make_solo_mosaic.yaml | ||
echo "make_solo_mosaic: {run_dir: $PWD}" | uw config realize --input-file $base --update-format yaml --output-file config.yaml | ||
uw make_solo_mosaic runscript --config-file config.yaml 2>/dev/null | ||
cat runscript.make_solo_mosaic |
1 change: 1 addition & 0 deletions
1
docs/sections/user_guide/cli/drivers/make_solo_mosaic/runscript.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cat: runscript.make_solo_mosaic: No such file or directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.. _filter_topo_yaml: | ||
|
||
filter_topo | ||
=========== | ||
|
||
Structured YAML to run the component ``filter_topo`` is validated by JSON Schema and requires the ``filter_topo:`` block, described below. If ``filter_topo`` is to be run via a batch system, the ``platform:`` block, described :ref:`here <platform_yaml>`, is also required. | ||
|
||
Documentation for the UFS Utils ``filter_topo`` program is :ufs-utils:`here <orog-gsl>`. | ||
|
||
Here is a prototype UW YAML ``filter_topo:`` block, explained in detail below: | ||
|
||
.. highlight:: yaml | ||
.. literalinclude:: /shared/filter_topo.yaml | ||
|
||
UW YAML for the ``filter_topo:`` Block | ||
-------------------------------------- | ||
|
||
config: | ||
^^^^^^^ | ||
|
||
Configuration parameters for the ``orog_gsl`` component. | ||
|
||
**input_grid_file:** | ||
|
||
Path to the tiled input grid file. | ||
|
||
namelist: | ||
^^^^^^^^^ | ||
|
||
Supports ``base_file:`` and ``update_values:`` blocks (see :ref:`updating_values` for details). Namelist options are described :ufs-utils:`here<id48>`. | ||
|
||
.. include:: /shared/validate_namelist.rst | ||
|
||
execution: | ||
^^^^^^^^^^ | ||
|
||
See :ref:`here <execution_yaml>` for details. | ||
|
||
run_dir: | ||
^^^^^^^^ | ||
|
||
The path to the run directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ UW YAML for Components | |
|
||
chgres_cube | ||
esg_grid | ||
filter_topo | ||
fv3 | ||
global_equiv_resol | ||
jedi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.