ufs-community / uwtools

Workflow tools for use with applications with UFS and beyond
GNU Lesser General Public License v2.1
12 stars 24 forks source link

Output methods for ungrib, MPAS, and MPAS Init. #625

Open christinaholtNOAA opened 1 month ago

christinaholtNOAA commented 1 month ago

AC

Description

Use stream files and other config settings to determine expected output for MPAS and MPAS Init and output in a dict with labels like those in stream file. Return a list (probably) of the ungribbed files.

No need to hook into CLI.

christinaholtNOAA commented 1 month ago

Ungrib

Output files are named from namelist entries like this pseudo code:

for file_date in share.start_date to share.end_data in share.interval_seconds: file_name = f"{ ungrib.prefix }:{ filedate.strfmt("%Y-%m-%d%h") }"

MPAS Init

Output file is defined from the streams.init_atmosphere for any entries matching the type=output. The filename_template entry defines the name of the output files. They use templates that look like:

filename_template="lbc.$Y-$M-$D_$h.$m.$s.nc"

MPAS

Same approach as MPAS, but the name of the streams file is streams.atmosphere. Both can probably use the values defined in the UW YAML.