Skip to content

Conversation

@dougiesquire
Copy link
Collaborator

Fixes for #110

I've gotten rid of the Supergrid_bgrid and Supergrid_cgrid classes, which contained a number of bugs. There is now only a single Supergrid class that extracts all required grid metrics. The Supergrid.extract_grid method now supports arguments for specifying the grid type (Arakawa, cell type and memory mode).

I've also restructured the CMIP6_Ocean_CMORiser classes accordingly, including fixing a number of bugs.

I'm not very familiar with ACCESS-MOPPy as a whole so it would be good if someone could check that these changes will integrate okay.

@dougiesquire dougiesquire requested review from rbeucher and rhaegar325 and removed request for rhaegar325 November 21, 2025 05:57
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 51.97740% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.81%. Comparing base (f9c0a33) to head (ca590ae).
⚠️ Report is 32 commits behind head on update_om2.

Files with missing lines Patch % Lines
src/access_moppy/ocean_supergrid.py 57.53% 62 Missing ⚠️
src/access_moppy/ocean.py 25.80% 23 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           update_om2     #128      +/-   ##
==============================================
+ Coverage       49.28%   50.81%   +1.52%     
==============================================
  Files              18       18              
  Lines            1469     1604     +135     
==============================================
+ Hits              724      815      +91     
- Misses            745      789      +44     

☔ 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.

@rhaegar325
Copy link
Collaborator

Thanks @dougiesquire for spending the time helping us resolve the grid issue, it's been incredibly helpful. Now that we understand how to compute different grids during the CMORization process, as well as how to calculate the corner points on a tripolar grid, this will greatly support our future work.

However, during the review I still came across a few questions and would like to double check them with you.

@dougiesquire
Copy link
Collaborator Author

Hi @rhaegar325. No worries. Did you want to organise a meeting or can you ask your questions here?

# as between the first two rows, for open
# boundary
penult_row_rev = np.fliplr(x[-2:-1, :])
x_ext = np.append(x, penult_row_rev, axis=0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

According to the comments above, this row should be added to the top of the matrix, but it has been added to the bottom instead. I'm not sure if I’m understanding it correctly, so I just want to double check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this adds to the top as desired?

penult_col = x_ext[:, -3:-2]
x_ext = np.append(penult_col, x_ext, axis=1)
bottom_row = x_ext[:1, :]
x_ext = np.append(bottom_row, x_ext, axis=0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similarly, it seems that this row should be added to the bottom, but it has been added to the top instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this adds to the bottom as desired?

@rhaegar325
Copy link
Collaborator

Thanks @dougiesquire. These are the questions I’ve come across so far while doing the review.

@rhaegar325 rhaegar325 self-requested a review December 1, 2025 05:27
Copy link
Collaborator

@rhaegar325 rhaegar325 left a comment

Choose a reason for hiding this comment

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

After a quick review, these changes will be incorporated into the CMORisation of the OM2 raw data, and I think it’s ready to be merged. Thanks again @dougiesquire, for your help!

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.

3 participants