ufs-community / ufs-weather-model

UFS Weather Model
Other
142 stars 248 forks source link

Avoid conflicting instantaneous CICE history output #2509

Open NickSzapiro-NOAA opened 19 hours ago

NickSzapiro-NOAA commented 19 hours ago

Description

If multiple history frequencies attempt to write instantaneous history output for the same time, CICE will abort by design as two streams cannot write to the same filename (see https://github.com/CICE-Consortium/CICE/blob/main/doc/source/user_guide/ug_implementation.rst).

This can happen in global-workflow configurations when running with DA (as encountered by @jswhit @DeniseWorthen) with:

histfreq   = 'm', 'd', 'h', '1', 'x'
histfreq_n =  0 ,  0 ,  3 ,  1 ,  1
hist_avg      = . false.

when the hourly and timestep streams have common times (which is likely).

While filenames for time-averaged output have stream frequency identifiers in the filenames, instantaneous output does not (as the file is just for a particular time).

Solution

The solution at CICE-Consortium is to use hist_suffix (see https://github.com/CICE-Consortium/CICE/issues/915) to distinguish between filenames for instantaneous output at different frequencies. Different suffixes are appended to filenames for the different frequencies giving unique filenames.

This does change the instantaneous history filename (if hist_suffix != 'x' ), which may need to propagate into post-processing and workflow steps. fyi @WalterKolczynski-NOAA @EricSinsky-NOAA

What the suffixes should be can be configurable

Alternatives

Don't write instantaneous output at multiple frequencies with common times

Related to