Skip to content

Add geospatial extent to model ouput schema#67

Merged
joshuatorrance merged 16 commits into66-clone-of-schemafrom
66-model-ouput-adding-geospatial
Apr 15, 2026
Merged

Add geospatial extent to model ouput schema#67
joshuatorrance merged 16 commits into66-clone-of-schemafrom
66-model-ouput-adding-geospatial

Conversation

@joshuatorrance
Copy link
Copy Markdown
Collaborator

@joshuatorrance joshuatorrance commented Mar 12, 2026

Closes #66

Adds the follow attributes to the model output schema:

  • geospatial_lat_min
  • geospatial_lat_max
  • geospatial_lat_units
  • geospatial_lon_min
  • geospatial_lon_max
  • geospatial_lon_units

Details and description are heavily plagiarised inspired by the ACDD equivalents.

I restricted this schema to require units of degrees_north/degrees_east. ACDD permits other units.

I have also restricted the longitude to -180 to 180. ACDD also allows 0 to 360. Reasoning here is just to keep things simple, if this would be restrictive then it can be relaxed.

  • Is the way I've duplicated the 2-0-0 schema the correct way to create a new schema?
  • The min/max values have type number. These are the first numbers in the schema - need to check all the downstream tools handle numbers correctly.
    • addmeta needs a solution for numerical templates see issue & PR
    • access-output-data-specifications may need an update to the auto-doc generation

@joshuatorrance joshuatorrance self-assigned this Mar 12, 2026
@joshuatorrance joshuatorrance marked this pull request as ready for review March 12, 2026 06:18
@joshuatorrance joshuatorrance changed the base branch from main to 66-clone-of-schema March 13, 2026 00:54
Copy link
Copy Markdown
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions and suggestions ...

Comment thread .github/workflows/schema-ci.yml Outdated
Comment thread .github/workflows/schema-ci.yml
Comment thread au.org.access-nri/model/output/file-metadata/2-1-0/global/geospatial_lat_max.json Outdated
Comment thread au.org.access-nri/model/output/file-metadata/2-1-0/global/geospatial_lat_min.json Outdated
Comment thread tests/2-1-0/test.json
@blimlim
Copy link
Copy Markdown

blimlim commented Mar 27, 2026

Thanks @joshuatorrance! I've taken a quick look at the changes and just had a couple of quick questions:

  1. Are there any issues if the models use different conventions to the geospatial_lon_max, geospatial_lon_min variables for their longitude data? E.g. the atmosphere outputs in ESM1.6 use longitudes in [0, 360], the ocean seems to use [-280, 80]

  2. I'm not on top of the details at all, but I believe the regional models can run with a rotated grid, e.g. In cases like this, I'm guessing the geospatial_..._max/min values wouldn't correspond to the exact bounding box for the dataset, but would contain it – would that cause any issues?

@joshuatorrance
Copy link
Copy Markdown
Collaborator Author

Thanks @joshuatorrance! I've taken a quick look at the changes and just had a couple of quick questions:

1. Are there any issues if the models use different conventions to the `geospatial_lon_max`, `geospatial_lon_min` variables for their longitude data? E.g. the atmosphere outputs in ESM1.6 use longitudes in [0, 360], the ocean seems to use [-280, 80]

2. I'm not on top of the details at all, but I believe the regional models can run with a rotated grid, [e.g](https://forum.access-hive.org.au/t/um-nesting-suite-lam-inclusion-grids-not-aligning/745/2). In cases like this, I'm guessing the `geospatial_..._max/min` values wouldn't correspond to the exact bounding box for the dataset, but would contain it – would that cause any issues?
  1. If the models use different conventions for their actual lat/lon values then it's probably simpler to not have any restrictions on the values for the geospatial bounds. The translation isn't complicated for these and downstream tools will need to handle the translation for the values themselves anyway.
  2. These values just describe the min/max for lat/lon so calculating their values may be trickier for rotated pole scenarios. They don't try to describe the bounding box for rotated poles, non-rectangular grids, etc., just the min/max values.

@joshuatorrance joshuatorrance merged commit b819b61 into 66-clone-of-schema Apr 15, 2026
1 check passed
@joshuatorrance joshuatorrance deleted the 66-model-ouput-adding-geospatial branch April 15, 2026 05:58
joshuatorrance added a commit that referenced this pull request Apr 16, 2026
* Made copy of 2-0-0 for new version, only updating version number

* Add geospatial extent to model ouput schema (#67)

* Added files for geospatial extent

* CI is failing to install? Updating to latest release

* Added exclusions for 2 linting rules, split command over multiple lines

* Does this work for adding another directory to run commands over?

* Updated 2-1-0 test with new attributes

* Updating schema testing to handle multiple versions

* Fixed typo

* Trying to fix looping in shell script

* Added rules to geospatial attributes

* Reordered new rules to satisfy formatter

* Apply suggestion from @aidanheerdegen

Co-authored-by: Aidan Heerdegen <aidan.heerdegen@anu.edu.au>

* Added simple tests for global attrs and geospatial attrs

* Added some simple tests for geospatial bounds

* Changed geospatial_*_units to use const instead of a pattern

* Removed examples from now const units

* Removed limits on lat/lon values, updated tests

---------

Co-authored-by: Aidan Heerdegen <aidan.heerdegen@anu.edu.au>

* Add time & time bnds (#70)

* Added time and time_bnds

* Added option for units of reference datetime to have seconds

* Now supporting alternative calendar options from CF.

* Added required to time

* Moved non-const time attrs into sub-schemas

* Added type to time units

* Added additional tests. These won't be run yet, should run after merge from neighbouring branch '66-model-ouput-adding-geospatial'

* Removed bounds from the required list.

* Added a test for missing bounds

* Updated calendar recommendations. @blimlim & @aidanheerdegen

* Tweaked time.json to satisfy formatter

---------

Co-authored-by: Aidan Heerdegen <aidan.heerdegen@anu.edu.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update model output schema with geospatial_lat/lon_min/max

3 participants