Skip to content

model_input_formatter (and get_fcast_definition) don't always work for dynamical.org #91

Description

@williamhobbs

For example, IFS ens and GEFS are only available for the 00 UTC cycles.

Something like the adjustments below can be applied as a fix:

available_date = pd.Timestamp.now('UTC')
run_length_needed = 246-18 
lead_time_to_start_needed = 0
init_date, run_length, lead_time_to_start = adjust_forecast_datetimes(
    available_date=available_date,
    run_length_needed=run_length_needed,
    lead_time_to_start_needed=lead_time_to_start_needed,
    model='gefs'
)
print(init_date, run_length, lead_time_to_start)

# adjust for dynamical
init_date_new = init_date.floor('24h')
offset = (init_date1 - init_date_new).seconds //3600
init_date = init_date_new
lead_time_to_start += offset

print(init_date, run_length, lead_time_to_start)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions