hafs-community / HAFS

Hurricane Analysis and Forecast System
Other
29 stars 54 forks source link

Improve HAFS scripts to redirect stdout and stderr to files for executables #242

Open BinLiu-NOAA opened 9 months ago

BinLiu-NOAA commented 9 months ago

Description

Provide a clear and concise description of the requested feature/capability. From NCO SPA: Please look into to improve HAFS scripts to redirect stdout and stderr to files (pgmout and errfile, for example) for executables, except executables with minimum amount of output (100 lines or so) at next upgrade.

Per the WCOSS implementation standards, page 16 -

  1. Any executions that print verbose output (more than 100 lines or so per execution) must redirect standard output and standard error to a file under $DATA, for example: $EXECmodel/$pgm >> $pgmout 2> errfile

For example - scripts/exhafs_atm_ic.sh scripts/exhafs_atm_lbc.sh scripts/exhafs_atm_prep.sh scripts/exhafs_atm_vi.sh ush/hafs_filter_topo.sh ush/hafs_make_grid.sh ush/hafs_make_orog.sh

Proposed solution

How should the new feature/capability be added? If you have thoughts on the implementation strategy, please share them here.

Status (optional)

Do you (or a colleague) plan to work on adding this feature?

Related to (optional)

Directly reference any related issues or PRs in this or other repositories, and describe how they are related. Examples:

BinLiu-NOAA commented 4 months ago

According to NCO SPA's suggestion, the stdout and stderr redirection (together with error handling) in HAFS application workflow scripts has been substantially improved in the latest production/hafs.v2 branch. For executables outputting large amount log information and print outs, the stdout and stderr will be redirected into a log file, meanwhile showing up in the job log file. Please see example commit 9118c62. Also for more details from the latest production/hafs.v2 branch.