Skip to content

Intake conversion SeaIce_Plot_Example #369

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

Merged
merged 22 commits into from
Jun 5, 2025

Conversation

rbeucher
Copy link
Contributor

@rbeucher rbeucher commented Jun 6, 2024

Following the discussion in issue #313, we propose converting the recipes to use Intake, given that the Cookbook is no longer supported and the ACCESS-NRI Intake catalog is now available.

A few months ago, @max-anu began working on this transition. This pull request contains the changes @max-anu made to the notebook specified in the title.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@anton-seaice
Copy link
Collaborator

Thanks @rbeucher . It looks like this was based on an older version of this recipe, not including the updates (#294) from the hackathon last September.

Do you have someone to merge with the latest version of the recipe? Or shall I do that?

@rbeucher
Copy link
Contributor Author

Feel free to do it. I took a cautious approach and decided not to merge changes from main

@anton-seaice anton-seaice marked this pull request as draft June 21, 2024 05:42
@anton-seaice anton-seaice self-assigned this Jun 21, 2024
@anton-seaice
Copy link
Collaborator

This PR is blocked on OM4_025.JRA_RYF not being in the Intake Catalog

@adele-morrison : Is this experiment appropriate to add to the catalog? The criteria are loosely:

  • This data product is stable (unlikely to change substantially or move)
  • This data product is of use to the broader community
  • This data product is documented:
  • This data product is licensed under
  • Those who want to access this data can be added to the project that houses it

@adele-morrison
Copy link
Collaborator

Yes, sure let's include OM4_025.JRA_RYF in the Intake Catalog. Sounds like it's at least worth keeping for the next year for OM3 development comparison.

@marc-white
Copy link
Contributor

Now that the necessary data are in the ACCESS-NRI Intake Catalog, I've finished converting the example notebook to Intake. @anton-seaice , @adele-morrison (and anyone else interested), could you please check the notebook for correctness, and then I'll prepare it for a final merge?

(You'll note I've left two additional notebooks in the Recipes directory for the moment; these are the single-model versions of the Sea Ice Coordinates notebook that I was using for development, so you can see what I had to do for each model, and then compare that to how I've combined them into the final notebook.)

@rbeucher rbeucher marked this pull request as ready for review May 23, 2025 01:03
@charles-turner-1 charles-turner-1 self-requested a review May 23, 2025 01:10
Copy link
Collaborator

@charles-turner-1 charles-turner-1 left a comment

Choose a reason for hiding this comment

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

Results look identical to me

@anton-seaice
Copy link
Collaborator

I have comments ... gimme a sec

@@ -0,0 +1,5199 @@
{
Copy link
Collaborator

@anton-seaice anton-seaice May 23, 2025

Choose a reason for hiding this comment

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

Line #2.    var_search = var_search.search(path=var_search.df['path'][0])

I think @charles-turner-1 fixed it so you don't need this workaround ?


Reply via ReviewNB

Copy link
Collaborator

Choose a reason for hiding this comment

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

removed

@@ -0,0 +1,5199 @@
{
Copy link
Collaborator

@anton-seaice anton-seaice May 23, 2025

Choose a reason for hiding this comment

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

This operation is not technically correct due to the tripole, but works because we only sum by hemisphere. I am not sure if maybe we should make a note ?

real latitude is geolat_t and real longitude is geolon_t


Reply via ReviewNB

Copy link
Collaborator

Choose a reason for hiding this comment

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

good call

@@ -0,0 +1,5199 @@
{
Copy link
Collaborator

@anton-seaice anton-seaice May 23, 2025

Choose a reason for hiding this comment

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

I realise i probably wrote this but using Y instead of latitude would be less misleading. (noting comment above about tripole)


Reply via ReviewNB

@@ -0,0 +1,5199 @@
{
Copy link
Collaborator

@anton-seaice anton-seaice May 23, 2025

Choose a reason for hiding this comment

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

Line #5.    plt.ylabel('Sea Ice Area (km$^{2}$)');

These are square metres sadly


Reply via ReviewNB

Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,5199 @@
{
Copy link
Collaborator

@anton-seaice anton-seaice May 23, 2025

Choose a reason for hiding this comment

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

Line #5.    plt.ylabel('Sea Ice Area (km$^{2}$)')

m^2 again :)


Reply via ReviewNB

Copy link
Collaborator

Choose a reason for hiding this comment

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

fixed

@anton-seaice
Copy link
Collaborator

Oh - the readme says

In Module directories, set /g/data/hh5/public/modules and in Modules set conda/analysis3.

Presumably this notebook only works with conda/analysis3 from xp65, and a 25.0x version?

So we need to update the readme ... the cosima cookbook recipes need 24.07 and the intake ones often need newer (I think ?)

@anton-seaice
Copy link
Collaborator

anton-seaice commented May 23, 2025

Second oh - I think the intention here is that the user selects CICE5 or SIS, rather than have two whole copies of the recipe here

@charles-turner-1
Copy link
Collaborator

Updated notebook runs the whole way through with no issues.

@anton-seaice
Copy link
Collaborator

When I try to run this using conda/analysis25.04, I get this:

BFD: Dwarf Error: Can't find .debug_ranges section.
==== backtrace (tid:1367696) ====
 0 0x0000000000012990 __funlockfile()  :0
 1 0x000000000025936e H5SL_search()  ???:0
 2 0x000000000020c57f H5P_set()  ???:0
 3 0x00000000000a36cc H5CX_pop()  ???:0
 4 0x00000000000a5dbb H5Dclose()  ???:0
 5 0x00000000000babcd nc4_rec_grp_HDF5_del.localalias()  hdf5internal.c:0
 6 0x00000000000b7bcc nc4_close_hdf5_file()  ???:0
 7 0x00000000000b7dc3 NC4_close()  ???:0
 8 0x0000000000082dc5 nc_close()  ???:0
 9 0x00000000000badea __pyx_pf_7netCDF4_8_netCDF4_7Dataset_14_close()  [/project/src/netCDF4/_netCDF4.c:30036](https://are.nci.org.au/project/src/netCDF4/_netCDF4.c#line=30035)
10 0x00000000000badea __pyx_pw_7netCDF4_8_netCDF4_7Dataset_15_close()  [/project/src/netCDF4/_netCDF4.c:29985](https://are.nci.org.au/project/src/netCDF4/_netCDF4.c#line=29984)
11 0x000000000009d5b2 __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18close()  [/project/src/netCDF4/_netCDF4.c:30584](https://are.nci.org.au/project/src/netCDF4/_netCDF4.c#line=30583)
12 0x000000000009d5b2 Py_XDECREF()  [/opt/_internal/cpython-3.11.9/include/python3.11/object.h:602](https://are.nci.org.au/opt/_internal/cpython-3.11.9/include/python3.11/object.h#line=601)
13 0x000000000009d5b2 __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18close()  [/project/src/netCDF4/_netCDF4.c:30585](https://are.nci.org.au/project/src/netCDF4/_netCDF4.c#line=30584)
14 0x000000000009d5b2 __pyx_pw_7netCDF4_8_netCDF4_7Dataset_19close()  [/project/src/netCDF4/_netCDF4.c:30472](https://are.nci.org.au/project/src/netCDF4/_netCDF4.c#line=30471)
15 0x00000000001f04dc PyObject_Vectorcall()  ???:0
16 0x00000000001e39f9 _PyEval_EvalFrameDefault()  ???:0
17 0x000000000020863f _PyFunction_Vectorcall()  ???:0
18 0x000000000020d792 PyObject_CallOneArg()  ???:0
19 0x00000000002df57f slot_tp_finalize()  :0
20 0x0000000000226a4b PyObject_CallFinalizerFromDealloc()  ???:0
21 0x000000000022ff30 subtype_dealloc()  :0
22 0x000000000022fca1 subtype_dealloc()  :0
23 0x000000000022fca1 subtype_dealloc()  :0
24 0x000000000022fca1 subtype_dealloc()  :0
25 0x00000000001d4f4c dict_dealloc()  :0
26 0x000000000022ff9e subtype_dealloc()  :0
27 0x000000000022fca1 subtype_dealloc()  :0
28 0x000000000022fca1 subtype_dealloc()  :0
29 0x000000000022fca1 subtype_dealloc()  :0
30 0x000000000022fca1 subtype_dealloc()  :0
31 0x00000000001d4ee7 dict_dealloc()  :0
32 0x00000000001d456a tupledealloc()  :0
33 0x000000000022fca1 subtype_dealloc()  :0
34 0x000000000022fca1 subtype_dealloc()  :0
35 0x0000000000223ee7 set_dealloc()  :0
36 0x000000000022fca1 subtype_dealloc()  :0
37 0x00000000001d4ef7 dict_dealloc()  :0
38 0x0000000000226dbc method_vectorcall()  :0
39 0x00000000001e7dbb _PyEval_EvalFrameDefault()  ???:0
40 0x0000000000226ca8 method_vectorcall()  :0
41 0x00000000001e7dbb _PyEval_EvalFrameDefault()  ???:0
42 0x000000000020863f _PyFunction_Vectorcall()  ???:0
43 0x00000000001e7dbb _PyEval_EvalFrameDefault()  ???:0
44 0x000000000020863f _PyFunction_Vectorcall()  ???:0
45 0x0000000000212434 PyObject_Call()  ???:0
46 0x00000000001e7dbb _PyEval_EvalFrameDefault()  ???:0
47 0x00000000002ae178 gen_send_ex2()  :0
48 0x00000000001e660a _PyEval_EvalFrameDefault()  ???:0
49 0x00000000002ae178 gen_send_ex2()  :0
50 0x00000000001e660a _PyEval_EvalFrameDefault()  ???:0
51 0x00000000002ae178 gen_send_ex2()  :0
52 0x00000000000076a6 task_step()  :0
53 0x00000000001f761a cfunction_vectorcall_O()  :0
54 0x0000000000191ae5 _PyObject_VectorcallTstate.lto_priv.7()  :0
55 0x0000000000193b65 context_run()  :0
56 0x00000000001f05ef cfunction_vectorcall_FASTCALL_KEYWORDS()  :0
57 0x00000000001eb9ad _PyEval_EvalFrameDefault()  ???:0
=================================

?

@charles-turner-1
Copy link
Collaborator

Can you try with 25.05? I think what you're seeing is a node communication error, 24.04 had some issues with ucx. @rbeucher might be able to give some more (informed) context.

@anton-seaice
Copy link
Collaborator

Result is the same with 25.05

@rbeucher
Copy link
Contributor Author

rbeucher commented Jun 4, 2025

Not sure what happened here. I'll let you resolve the conflicts @charles-turner-1

@anton-seaice
Copy link
Collaborator

@charles-turner-1 - I made the changes I wanted to make. Can you try running this and commit a clean run of the notebook ? Thanks

@charles-turner-1
Copy link
Collaborator

@anton-seaice I think this is ready to go, can you just double check for me? I merged in the version of Sea_Ice_Seasonality_Statistics.ipynb from main in fc0877b but I could have sworn there were some other files changed.

Copy link

review-notebook-app bot commented Jun 5, 2025

View / edit / reply to this conversation on ReviewNB

anton-seaice commented on 2025-06-05T00:10:19Z
----------------------------------------------------------------

It looks like Sea ice coordinates is the preferred name (and maybe change in between the start of this PR and now)


@anton-seaice
Copy link
Collaborator

I dont understand what is going on with fc0877b

Like you've committed something to Sea_Ice_Seasonality_Statistics.ipynb but it doesn't show in the diff?

Maybe do a hard reset (from main) on just that file?

@charles-turner-1
Copy link
Collaborator

charles-turner-1 commented Jun 5, 2025

I just merged in the version from main - I'd added some info about environment versions which had disappeared for whatever reason.

If you can't see anything (without screwing around with git diff A...B and git diff A..B) I think we've got the desired outcome.

@charles-turner-1 charles-turner-1 merged commit 89462b4 into main Jun 5, 2025
3 checks passed
@charles-turner-1 charles-turner-1 deleted the INTAKE_SeaIce_Plot_Example branch June 5, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants