-
Notifications
You must be signed in to change notification settings - Fork 86
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
Move diag_table creation to fcst run script #349
Closed
christinaholtNOAA
wants to merge
6
commits into
ufs-community:develop
from
christinaholtNOAA:diag_table_creation
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
56a9219
Rename file.
christinaholtNOAA 64fa30d
Changes for run-time creation of diag_table.
christinaholtNOAA 2d16a4a
No need to make this file here.
christinaholtNOAA eec807a
The modulefiles must have changed names.
christinaholtNOAA 9b56257
Merge remote-tracking branch 'dtc/develop' into diag_table_creation
christinaholtNOAA 9ac54a3
Merge remote-tracking branch 'dtc/develop' into diag_table_creation
christinaholtNOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -621,24 +621,6 @@ done | |
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Call a function to generate the array ALL_CDATES containing the cycle | ||
# dates/hours for which to run forecasts. The elements of this array | ||
# will have the form YYYYMMDDHH. They are the starting dates/times of | ||
# the forecasts that will be run in the experiment. Then set NUM_CYCLES | ||
# to the number of elements in this array. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
set_cycle_dates \ | ||
date_start="${DATE_FIRST_CYCL}" \ | ||
date_end="${DATE_LAST_CYCL}" \ | ||
cycle_hrs="${CYCL_HRS_str}" \ | ||
output_varname_all_cdates="ALL_CDATES" | ||
|
||
NUM_CYCLES="${#ALL_CDATES[@]}" | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Set various directories. | ||
# | ||
# HOMErrfs: | ||
|
@@ -2662,18 +2644,6 @@ LBC_SPEC_FCST_HRS=(${LBC_SPEC_FCST_HRS[@]}) | |
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# The number of cycles for which to make forecasts and the list of starting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above (please leave in the script for now). Thx! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code would stay unchanged with the added if statement mentioned above. |
||
# dates/hours of these cycles. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
NUM_CYCLES="${NUM_CYCLES}" | ||
ALL_CDATES=( \\ | ||
$( printf "\"%s\" \\\\\n" "${ALL_CDATES[@]}" ) | ||
) | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# If USE_FVCOM is set to TRUE, then FVCOM data (located in FVCOM_DIR | ||
# in FVCOM_FILE) will be used to update lower boundary conditions during | ||
# make_ics. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we leave this script as is? I like having an array handy (ALL_CDATES) that contains all the cycles over which the workflow will run. Maybe even print it out for informational purposes. Otherwise everything looks good, so I'll approve.
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.
@gsketefian It's fine to leave it in for experiments that are only a couple of cycles, but when using the configuration layer for real time purposes where common practice is to set the last cycle to an arbitrarily long time in the future it becomes more cumbersome than necessary, printing out an array of 1800+ dates for a real time run that defines 5 cycles per day for a year (example from current RRFS_dev* configs). Can you not get this information from the Rocoto database, where it would be more accurate, anyway?
If there are no dependencies on needing to know all the cycles, there should be no need for the var_defns.sh file to know this huge array.
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, @gsketefian, since this array may be useful in the future, let's create an if statement here that only outputs the start and end cycles above a given threshold (for now, 30). I've tested this with Christina's fork and it works as expected.
set_cycle_dates
date_start="${DATE_FIRST_CYCL}"
date_end="${DATE_LAST_CYCL}"
cycle_hrs="${CYCL_HRS_str}"
output_varname_all_cdates="ALL_CDATES"
NUM_CYCLES="${#ALL_CDATES[@]}"
if [ $NUM_CYCLES -gt 30 ] ; then
unset ALL_CDATES
print_info_msg "$VERBOSE" "
Too many cycles in ALL_CDATES, defining in abbreviated form."
ALL_CDATES="${DATE_FIRST_CYCL}${CYCL_HRS[0]}...${DATE_LAST_CYCL}${CYCL_HRS[-1]}"
fi