ungrib
The uw mode for configuring and running the WRF preprocessing component ungrib.
uw ungrib --help
usage: uw ungrib [-h] [--version] TASK ...
Execute ungrib tasks
Optional arguments:
-h, --help
Show help and exit
--version
Show version info and exit
Positional arguments:
TASK
gribfiles
Symlinks to all the GRIB files
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
vtable
A symlink to the Vtable file
All tasks take the same arguments. For example:
uw ungrib run --help
usage: uw ungrib run --cycle CYCLE [-h] [--version] [--config-file PATH]
[--batch] [--dry-run] [--graph-file PATH]
[--key-path KEY[.KEY...]] [--quiet] [--verbose]
A run
Required arguments:
--cycle CYCLE
The cycle in ISO8601 format (e.g. 2024-05-23T18)
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
Examples
The examples use a configuration file named config.yaml with contents similar to:
ungrib:
execution:
batchargs:
cores: 1
walltime: "00:01:00"
executable: /path/to/ungrib.exe
gfs_files:
forecast_length: 24
interval_hours: 6
offset: 0
path: /path/to/dir/gfs.t{cycle_hour:02d}z.pgrb2.0p25.f{forecast_hour:03d}
run_dir: /path/to/dir/run
vtable: /path/to/Vtable.GFS
platform:
account: me
scheduler: slurm
Its contents are described in depth in section ungrib.
Run
ungribon an interactive node$ uw ungrib run --config-file config.yaml --cycle 2021-04-01T12
The driver creates a
runscript.ungribfile in the directory specified byrun_dir:in the config and runs it, executingungrib.Run
ungribvia a batch job$ uw ungrib run --config-file config.yaml --cycle 2021-04-01T12 --batch
The driver creates a
runscript.ungribfile in the directory specified byrun_dir:in the config and submits it to the batch system. Running with--batchrequires a correctly configuredplatform:block inconfig.yaml, as well as appropriate settings in theexecution:block underungrib:.Specifying the
--dry-runflag results in the driver logging messages about actions it would have taken, without actually taking any.$ uw ungrib run --config-file config.yaml --cycle 2021-04-01T12 --batch --dry-run
The
--key-pathoption can be used to navigate from the top of the config to the driver’s configuration block. For example, specifying--key-path foo.barwith configfoo: bar: driver: # driver config block
is equivalent to using config
driver: # driver config block
without specifying
--key-path.The
runtask depends on the other available tasks and executes them as prerequisites. It is possible to execute any task directly, which entails execution of any of its dependencies. For example, to create anungribrun directory provisioned with all the files, directories, symlinks, etc. required per the configuration file:$ uw ungrib provisioned_run_directory --config-file config.yaml --cycle 2021-04-01T12 --batch