Skip to content

#861 Initial working coordinate replacement for NEMO#904

Open
Jared Drayton (mo-jareddrayton) wants to merge 3 commits into
mainfrom
861-model-data-fix-latitude-and-longitude-for-ukcm2
Open

#861 Initial working coordinate replacement for NEMO#904
Jared Drayton (mo-jareddrayton) wants to merge 3 commits into
mainfrom
861-model-data-fix-latitude-and-longitude-for-ukcm2

Conversation

@mo-jareddrayton
Copy link
Copy Markdown
Collaborator

Closes #861

  1. Changed replacement_coordinates_file to replacement_coordinate_files and made it a list. Similar to how the ancil files work in the model .json. (I haven't changed the naming everywhere just yet in case this changes after inital review)
  2. Differentiating between the loaded replacement cubes for the NEMO coords is done by adding model component and substream information to the netcdf files themselves.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like an elegant solution -- could do with documenting how to produce the required coordinates files

@mo-jareddrayton Jared Drayton (mo-jareddrayton) marked this pull request as ready for review April 28, 2026 12:22
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generally looks good -- Could you double check the model config files; in a few CMIP6 UKESM1-0 and CMIP7 UKCM2 the replacement_coordinate_files entry is a list, but in most it is still a string. I couldn't obviously see this difference being handled in the code and I think it would be clearer if you did a global replace of
"replacement_coordinate_files": "cice_eORCA1_coords.nc", with
"replacement_coordinate_files": ["cice_eORCA1_coords.nc"],

and similarly for the eORCA025 equivalent

"""
ancil_files = get_ancil_files(request)
replacment_coordinates_file = get_replacement_coordinates_file(request)
replacment_coordinates_file = get_replacement_coordinate_files(request)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

pedantry: spelling of replacement

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just marking as changes needed for clarity on PR page

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.

Model data Fix: Latitude and longitude for UKCM2

2 participants