ufs-community / ufs-weather-model

UFS Weather Model
Other
134 stars 243 forks source link

ATM diag_time is not correct when model restarts from the middle of fhzero. #1420

Closed bingfu-NOAA closed 1 year ago

bingfu-NOAA commented 2 years ago

Description

When ufs-weather-model restarts from the middle of fhzero (fhzero=6, restarts from f03), the previous diag_time in the code is not correctly set. In this case(fhzero=6, restarts from f03), when model integration reaches f06, the previous bucket empty time should be 6 hours ago, but it shows 3 hours ago.

To Reproduce:

run p8 restarting from f03.

Additional context

model integration to f06 from the current model: ---isec,seconds 10800 21600 gfs diags time since last bucket empty: 3.00000000000000 hrs

correct diag_time when model integration to f06 ---isec,seconds 21600 21600 gfs diags time since last bucket empty: 6.00000000000000 hrs

Output

Screenshots If applicable, drag and drop screenshots to help explain your problem.

output logs If applicable, include relevant output logs. Either drag and drop the entire log file here (if a long log) or

paste the code here (if a short section of log)
SMoorthi-emc commented 2 years ago

This is NOT a bug. You just need to set fhzero=3, if you want to restart from hour 3. Restart interval cannot be less than fhzero.

On Wed, Sep 14, 2022 at 3:59 PM Bing Fu @.***> wrote:

Description

When ufs-weather-model restarts from the middle of fhzero (fhzero=6, restarts from f03), the previous diag_time in the code is not correctly set. In this case(fhzero=6, restarts from f03), when model integration reaches f06, the previous bucket empty time should be 6 hours ago, but it shows 3 hours ago. To Reproduce:

run p8 restarting from f03. Additional context

model integration to f06 from the current model: ---isec,seconds 10800 21600 gfs diags time since last bucket empty: 3.00000000000000 hrs

correct diag_time when model integration to f06 ---isec,seconds 21600 21600 gfs diags time since last bucket empty: 6.00000000000000 hrs Output

Screenshots If applicable, drag and drop screenshots to help explain your problem.

output logs If applicable, include relevant output logs. Either drag and drop the entire log file here (if a long log) or

paste the code here (if a short section of log)

— Reply to this email directly, view it on GitHub https://github.com/ufs-community/ufs-weather-model/issues/1420, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLVRYUXE7CGYNYPWKECP5LV6IVCBANCNFSM6AAAAAAQMXWTZU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Dr. Shrinivas Moorthi Research Meteorologist Modeling and Data Assimilation Branch Environmental Modeling Center / National Centers for Environmental Prediction 5830 University Research Court - (W/NP23), College Park MD 20740 USA Tel: (301)683-3718

e-mail: @.*** Phone: (301) 683-3718 Fax: (301) 683-3718

bingfu-NOAA commented 2 years ago

GEFS reforecast needs to use fhzero=6 and restart from f03 because of IAU in the reanalysis. This is what we did for GEFSv12 reforecast, and it is planned again for GEFSv13 reforecast. It seems that the code is broken at some point after GEFSv12 reforecast project.

pjpegion commented 2 years ago

@bingfu-NOAA looking at the code I see:

if (Atmos%iau_offset > zero) then call get_time (Atmos%Time - Atmos%Time_init, sec) if (sec < Atmos%iau_offset*3600) then diag_time = Atmos%Time_init diag_time_fhzero = Atmos%Time endif endif

you may want to try running with iau_offset=3

bingfu-NOAA commented 2 years ago

@pjpegion Thank you for providing the solution for this. We revised the code to deal with this in GEFSv12 reforecast a few years ago, but the code is broken at some point after GEFSv12 reforecast. I have a temporary fix to correct the diag time now and I am using it for replay demonstration.

junwang-noaa commented 2 years ago

@bingfu-NOAA @pjpegion @SMoorthi-emc I made changes in the code to get correct diag_time and are testing it now. As Moothi said model should not restart at non multiple of fhrezo time as we don't save bucket accumulations in the restart files. The changes I made will allow model to have correct diag_time/bucket time in those restart runs, but the accumulated fields in the first output file only has accumulation from current_time to the end of bucket. User needs to be aware of this if they choose to restart the model at these forecast time. I added comments in the code.

bingfu-NOAA commented 2 years ago

@junwang-noaa Thanks Jun for the code changes, we definitely need this for upcoming real GEFSv13 reforecast.

bingfu-NOAA commented 1 year ago

@junwang-noaa Has the code changes you mentioned been committed? We need that code change for GEFSv13 forecast.