-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[develop] Fix issues on AQM and NCO mode caused by new YAML interface PR #676 #722
[develop] Fix issues on AQM and NCO mode caused by new YAML interface PR #676 #722
Conversation
… into bugfix/aqm_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chan-hoo Again, I am sorry that I did not see your comments on the Issue earlier.
I have just a concerns about these changes below.
if [ "${NUM_FCST_LEN_CYCL}" -gt "1" ]; then | ||
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} )) | ||
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} )) | ||
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this logic works just right.
If DATE_FIRST_CYCL starts at 18Z, and we're looking at the next 00Z cycle, we get:
cyc_mod=$(( 00 - 18 ))
CYCLE_IDX=$(( -18 / 6 ))
So we're left with a negative CYCLE_IDX
and can't get the right information in the list. I'd suggest that we add the requirement on FCST_LEN_CYCL
to define a list that starts from 00Z and increments by the FCST_LEN_CYCL
if you need to define variable forecasts lengths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christinaholtNOAA, I don't agree with you. {cyc} starts from a lower value. if {cyc} includes "06" and "18", its order will be ["06", "18"] (not ["18", "06"]). I think the 'cyc_mod' will not have a negative value in any cases because these variable forecast length hours are only set per day as you modified it in your former PR:
ufs-srweather-app/ush/setup.py
Line 681 in 662ff2a
# Check that the number of entries divides into a day |
What do you think about this? In the above example of ["06", "18"], the current condition will fail because their indexes will be [ "06/12", "18/12"]. With a new condition, they will be ["0", "1"] (["(6-6)/12", "(18-6)/12"]).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still concerned about the use case given that there would be a strong coupling between the FCST_LEN_CYCL
and the DATE_FIRST_CYCL
and DATE_LAST_CYCL
variables.
In the above example, I was suggesting that these might be the user-defined settings for two cycles, where the first is meant to be a short forecast and the second a long one:
DATE_FIRST_CYCL=2023030518
DATE_LAST_CYCL=2023030600
FCST_LEN_CYCL=["06", "18"]
This is a specific example of where I'm saying it might be better to require users to define FCST_LEN_CYCL
as if it were all the possible daily cycles like this:
FCST_LEN_CYCL=["18", "06", "06", "06"]
This means that we don't have to handle the "special" cases and aren't so heavily coupling the user-defined dates to the forecast lengths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christinaholtNOAA, I understand your concern. However, the change in this PR is better than the current one you made because it at least works for the special case. The current version will not work for both cases (my case as well as your case). In my opinion, the best solution is to use my original version:
for i_cdate in "${!ALL_CDATES[@]}"; do
if [ "${ALL_CDATES[$i_cdate]}" = "${PDY}${cyc}" ]; then
FCST_LEN_HRS="${FCST_LEN_CYCL_ALL[$i_cdate]}"
break
fi
I understand that you didn't want to use ALL_CDATES
, but this one will not have any issues. What do you think about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaning on ALL_CDATES is not a valid solution for when we want to run a real-time run indefinitely. Do you mind sharing the use case that you are trying to get running? The start and end date, and the forecast lengths you'd like to support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Official NRT (Near Real Time) run: 4 cycles per day ("00" "06" "12" "18") and varying forecast length hours = ("06" "72" "72" "06").
- Official Retro run: same 4 cycles per day and lengths as 1); 3 month period
- Non-official test run: 2 cycles per day ("06" "18") for 3 days ("INCR_CYCL_FREQ: 12). This case causes the error in the current status. We don't support this case officially. However, I remember someone asked me if this case was available in the workflow. This is the reason why I am trying to update this part in my PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christinaholtNOAA, if you don't agree with my change, please provide us a reasonable solution. This PR takes so long for review now. The AQM users are not able to use the develop branch now and they are waiting for this PR to be merged. @MichaelLueken, could you please ask other reviewers to review this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Some minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After chatting with @chan-hoo, we decided to open an Issue on the limitations of this formulation, and go ahead with this PR as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chan-hoo Thank you for working with @christinaholtNOAA and @danielabdi-noaa to address their concerns! These changes look good to me, so approving and submitting Jenkins tests now.
DESCRIPTION OF CHANGES:
community
andnco
modes.nco
mode.Type of change
TESTS CONDUCTED:
Fundamental WE2E tests on WCOSS2
ISSUE:
Fixes issue mentioned in #709
CHECKLIST