Skip to content

Regional configs to read input data using new XIOS API for time varying fields #615

Open

Description

Are there any linked Issues or Pull Requests?

Yes. PR for implementing this functionality is #735

Brief description

Currently the IO API to XIOS that the regional configurations use to read in data fields (e.g. time varying ancillaries, etc.) in specified time chunks (using the time_axis_type), which is a more clunky that the newer API which allows for time-varying fields.

Further details of the issue.

The purpose is the migration of GungHo time-varying ancillaries from the legacy time_axis_type path to the newer file-owned temporal path in lfric_xios_file_type.

The old ancillary path in science/gungho/source/driver/init_ancils_mod.f90 creates one time_axis_type per ancillary group, attaches raw time-window fields to that axis, inserts the axis into model_axes%ancil_times_list, and relies on the driver to refresh the fields.

The goal is to move temporal cache ownership out of the driver and into the file object, while keeping reads bounded to the time slices actually needed by the run.

Activity

  1. changed the title [-]Regional modelling configs to read input data at user defined timestamps or time windows[/-] [+]Regional configs to read input data at user defined timestamps or time windows[/+] on Jul 13, 2026
  2. changed the title [-]Regional configs to read input data at user defined timestamps or time windows[/-] [+]Regional configs to read input data using new XIOS API for time varying fields[/+] on Aug 26, 2026
  3. ricky-lv426 commented on Aug 26, 2026

    @ricky-lv426
    ContributorAuthor

    Implementation plan (tentative)

    Technical details

    Inspection of lfric_core clarified a few things.

    • lfric_xios_file_type owns an embedded temporal_type
    • fields_in_file attaches every field in the supplied collection to that file
    • freq is a file operation cadence in timesteps, not a time-slice count
    • the temporal cache window is internal to temporal_type
    • update_freq controls model-field refresh cadence and whether interpolation is enabled

    This means a migrated ancillary file must be given a dedicated field collection containing only the fields present in that file.

    Also the following is noted:

    The new path does not currently expose a public window caching setting.

    Inside lfric_core/components/lfric-xios/source/lfric_xios_temporal_mod.x90, the cache window is derived automatically:

    • start from window_size = 1
    • add one slice if the context start is not exactly on a file timestamp
    • add one slice if interpolation is required

    So the effective cache is currently 1, 2, or 3 slices depending on alignment and interpolation.

    This is different from the legacy time_axis_type path, where window_size could be passed explicitly and defaults to 3.

    Also the update_freq is an integer time enum passed into lfric_xios_file_type and converted inside duration_from_enum(...):

    • update_freq=0 disables interpolation and updates the model field only at file time points
    • update_freq/=0 enables interpolation and updates the model field on the requested cadence

    Some keyword meanings:

    Term Path Meaning
    pop_freq legacy time_axis_type how often cached ancillary data is pushed into the live model field
    interp_flag legacy time_axis_type whether to interpolate between neighbouring time entries
    freq file-owned lfric_xios_file_type how often the file gets a read/write opportunity in model timesteps
    update_freq file-owned lfric_xios_file_type how often the live model field is refreshed from the temporal cache
    internal window_size file-owned temporal_type how many time slices are cached in memory

    Way forward

    The tentative plan for each migrated ancillary file is to:

    • register the file with operation=OPERATION_TIMESERIES
    • pass a field collection containing only the fields in that file
    • let the file-owned temporal_type manage the cache and model-field updates
    • stop attaching those fields to legacy time_axis_type objects
    • remove any driver logic that still depends on that time axis for the migrated file

    The main setup point for this would be science/gungho/source/driver/gungho_setup_io_mod.F90.

    Issues/details to clarify

    • How to map old user tunable functionality where the window_size could be passed explicitly, to in hidden window cache size setting of the new api.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions