Fix Restart IAU and Ultra-Low Reproducibility Issues by Adding Control Parameter to Restart File#1481
Conversation
|
So in model/src/wav_comp_nuopc.F90 there is a |
|
It does not record a start time or similar and then offset from start time. In my understanding, using startTime based TimeOffset may not be sufficient/straightforward to match time step counter between control and restart. We may need a global reference time to define control parameter (time step counter or similar to ITIME). Writing a control parameter in restart file as an optional feature provides a more straightforward solution. We can use it as needed. |
0d433e0 to
0929f94
Compare
|
all test are done ok at ufs-community/ufs-weather-model#2851. @mingchen-NOAA @JessicaMeixner-NOAA can you merge this pr? |
2a96637
into
NOAA-EMC:dev/ufs-weather-model
Pull Request Summary
This PR addresses issues with restart IAU and ultra-low reproducibility in UFS-WM by introducing a new control parameter in the restart file. This parameter ensures consistent behavior between 'control' and 'restart' runs when IAU or ultra-low features are enabled, improving reproducibility and model consistency.
Description
The restart reproducibility issue in UFS-WM when using IAU or Ultra-low feature has been traced to the following line of code:
https://github.com/NOAA-EMC/WW3/blob/develop/model/src/w3pro3md.F90#L1851
In the control run (IAU or warmstart), the time step counter, ITIME is even at the restart time. However, in the restart run, ITIME is reinitialized and starts from 1, making it odd at the same point in simulation. This mismatch causes minor but consistent differences between the 'control' and 'restart' runs.
This PR introduces a new feature that enables writing, reading, or both writing and reading a control parameter in the restart file. The feature addresses issues related to restart IAU and ultra-low reproducibility in UFS-WM.
In detail, this PR modifies wav_restart_mod.F90 to enable an optional feature for writing, reading, or both writing and reading a control parameter in the restart file. This enhancement ensures consistent behavior between control and restart runs in the UFS-WM, particularly when IAU or ultra-low reproducibility features are activated.
A new control parameter, 'ITSTEP', is declared and initialized in the W3ADATMD module. It replaces the original 'ITIME' variable to control run-time execution order in the subroutines W3KTP2 and W3KTP3, located in w3pro2md.F90 and w3pro3md.F90, respectively.
Issue(s) addressed
Addressing issue #2306 and issue #2652
Commit Message
Add optional control parameter to restart file to ensure consistent IAU and ultra-low reproducibility behavior
Check list
Testing