Skip to content

Add geospatial extent to model ouput schema#67

Open
joshuatorrance wants to merge 10 commits into66-clone-of-schemafrom
66-model-ouput-adding-geospatial
Open

Add geospatial extent to model ouput schema#67
joshuatorrance wants to merge 10 commits into66-clone-of-schemafrom
66-model-ouput-adding-geospatial

Conversation

@joshuatorrance
Copy link
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
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 ...


- name: Install the Sourcemeta JSON Schema CLI
uses: sourcemeta/jsonschema@v11.8.3
uses: sourcemeta/jsonschema@v14.14.2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uses: sourcemeta/jsonschema@v14.14.2
uses: sourcemeta/jsonschema@f0b6672d82955e58a73efd320068284a4e7a4483 #v14.14.2

To reduce the possibility of supply-chain injection attacks we use commit hashes rather than versions for all actions not owned by us or GitHub.

Comment on lines +44 to +45
# Need to iterate through each pair of DIRS since there will be name
# collisions with different versions of the same schema
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to specify --resolve on the command line if target is defined in the test file?

"examples": [ 90, 12.98 ],
"type": "number",
"maximum": 90,
"minimum": -90
Copy link
Member

Choose a reason for hiding this comment

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

I know it's difficult to say a-priori what the minimum of lat_max should be, but -90 seems kinda odd.

Also, it should be greater than lat_min, but can we refer to other attributes in that way? Or is that more of a manual check we should make with CI in a data publishing pipeline?

"description": "Specifies the southernmost latitude covered by the dataset. Units should be \"degrees North\" and values should be a number equal to or between -90 and 90.",
"examples": [ -90, -57.97 ],
"type": "number",
"maximum": 90,
Copy link
Member

Choose a reason for hiding this comment

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

See other comment, +90 seems odd for lat_min but I understand there might not be much else that can be done.

Copy link
Member

Choose a reason for hiding this comment

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

Should there be (failing) tests where require fields are missing and/or have incorrect values?

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

2 participants