Skip to content

Managing time in CABLE #656

@SeanBryan51

Description

@SeanBryan51

There are a number of situations in CABLE where the behaviour of the code is determined by the time of the current time step. For example:

  1. Timing of writing output and aggregating data in time
  2. Timing of running CASA-CNP at the end of every day
  3. Timing of CASA-CNP input/output
  4. Timing of running POP at the end of every year

Potential differences in how time is managed throughout the model makes it difficult to synchronise functionality which happen at specific frequencies. This was highlighted recently by @Whyborn in #655 when looking into how output variables are aggregated and updated in time. It would be great if there were a centralised approach to managing time in CABLE which could provide time related information consistently. This information could include:

  • The current time step index
  • Whether the previous, current or next time step is the last or first time step of the hour, day, month or year
  • Whether the current time step is the last time step
  • The date and time of the previous, current or next time step
  • The type of calendar being used

We can take inspiration from other models which follow a similar idea:

Relevant libraries:

  • datetime-fortran library used in some access models could be useful for computing dates and times

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