Skip to content

Refactor fix_forecast_reference_time and convert_proleptic #197

@atteggiani

Description

@atteggiani

Overview

The fix_forecast_reference_time function currently:

  • Ensures the time points are correct and produces time bounds only if the time reference is < 1600 and calendar is Proleptic Gregorian. Time bounds should be produced only for output files for any calendar type.
  • Removes forecast_reference_time and forecast_period coordinates if present
  • Fails to always produce files with correct time coordinates (example here)

Solution

Refactor the fix_forecast_reference_time and convert_proleptic functions to:

  • Convert time units to days
  • Remove forecast_reference_time and forecast_period coordinates if present
  • Produce time bounds only for output files (no ancil and restarts) for any calendar.
  • Always produce files with the correct time coordinate
  • Change proleptic gregorian start date to 15/10/1582
  • For time having a proleptic gregorian calendar and forecast reference time before the proleptic gregorian start date, convert time points to be consistent with the proleptic gregorian calendar (iris loads them as gregorian times)
  • Time units origin will not change (stay whatever iris sets)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions