Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOT FOR CHANGELOG; PR NOT IN MAIN] Add mappings for ocean variables #2702

Open
wants to merge 4 commits into
base: icon-xpp
Choose a base branch
from

Conversation

jmalles
Copy link

@jmalles jmalles commented Apr 3, 2025

Mappings for ICON-XPP ocean variables.

The sea ice variables (sithick/sic) will need adjustments in the fix, since they have an extra "lev" dimension that is not expected by CMOR. I posted one possible generic solution in the comments of #2699. Otherwise, the variables would need to fixed be individually.

Moreover, variables like mixed layer depth (mlotst) or sea surface height (zos) might have different names/definitions in different output files. I added mappings of what I considered to be reasonable defaults.

Does not close but helps to close #2694


Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.13%. Comparing base (14d36a7) to head (73cd5e7).
Report is 8 commits behind head on icon-xpp.

Additional details and impacted files
@@            Coverage Diff            @@
##           icon-xpp    #2702   +/-   ##
=========================================
  Coverage     95.13%   95.13%           
=========================================
  Files           257      257           
  Lines         15057    15057           
=========================================
  Hits          14324    14324           
  Misses          733      733           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@schlunma schlunma changed the title Add mappings for ocean variables [NOT FOR CHANGELOG; PR NOT IN MAIN] Add mappings for ocean variables Apr 3, 2025
@schlunma schlunma self-requested a review April 3, 2025 14:11
@schlunma schlunma added the fix for dataset Related to dataset-specific fix files label Apr 3, 2025
@schlunma schlunma added this to the v2.13.0 milestone Apr 3, 2025
zos: {raw_name: zos, var_type: oce_dbg}
hfds: {raw_name: HeatFlux_Total, var_type: oce_dbg}
sithick: {raw_name: hi, var_type: oce_ice}
sic: {raw_name: conc, var_type: oce_ice, raw_units: '1'}
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't find sic in the CMOR tables, do you mean siconc? In this case, we can remove it from above and put it here (siconca, the sea ice concentration on the atm grid should stay above).

Copy link
Author

@jmalles jmalles Apr 4, 2025

Choose a reason for hiding this comment

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

I think sic was the short_name in CMIP5, hence it still worked in the recipe. If you think it should be the one from the atmosphere output anyways, the entry from the ocean variables could be deleted I suppose. Otherwise, it could be changed to siconc to accomodate for both ocean and atmosphere output.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since ICON uses the CMIP6 tables, I think siconc would be better here.

@schlunma

This comment was marked as outdated.

@schlunma
Copy link
Contributor

schlunma commented Apr 4, 2025

The sea ice variables (sithick/sic) will need adjustments in the fix, since they have an extra "lev" dimension that is not expected by CMOR. I posted one possible generic solution in the comments of #2699. Otherwise, the variables would need to fixed be individually.

I thought about this more, and I guess there's a more or less safe way to do this in general. You could check if a dimensional coordinate lev with the exact format is in the cube and then remove it if necessary:

lev_coord = DimCoord(0.0, var_name="lev")
if cube.coords(lev_coord, dim_coords=True):
    slices = [slice(None)] * cube.ndim
    slices[cube.coord_dims(lev_coord)[0]] = 0
    cube = cube[tuple(slices)]
    cube.remove_coord(lev_coord)    

@jmalles
Copy link
Author

jmalles commented Apr 4, 2025

duplication of key "siconc" in mapping: I remove the ocean mapping?

@schlunma
Copy link
Contributor

schlunma commented Apr 4, 2025

Remove the siconc entry in the atmosphere part above. siconc is supposed to be the "Sea-Ice Area Percentage (Ocean Grid)", so I guess this should be derived from the ocean files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix for dataset Related to dataset-specific fix files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants