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

Add ismip6 forcing testgroup #410

Merged
merged 58 commits into from
Nov 22, 2022

Conversation

hollyhan
Copy link
Contributor

@hollyhan hollyhan commented Jun 12, 2022

This PR adds a test group to COMPASS that processes the ISMIP6 forcing data provided by the ISMIP6 experimental protocol that target the upcoming IPCC AR6 assessment (https://www.climate-cryosphere.org/wiki/index.php?title=ISMIP6-Projections-Antarctica). Processing includes remapping the original data onto MALI mesh and renaming variables so that the output data can be used to force MALI. In the test group, three test cases have been added: atmosphere, ocean_basal and ocean_thermal.

Original version of this PR is #377, which has been closed in favor of this most updated version, which adds a step to the atmosphere test case that processes the modern climatology (1995-2017) of the RACMO data (https://tc.copernicus.org/articles/12/1479/2018/) and data and applies a climatology correction to the ismip6 SMB anomaly data.

@pep8speaks
Copy link

pep8speaks commented Jun 12, 2022

Hello @hollyhan! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 328:80: E501 line too long (94 > 79 characters)
Line 329:80: E501 line too long (90 > 79 characters)
Line 335:80: E501 line too long (103 > 79 characters)
Line 339:80: E501 line too long (114 > 79 characters)
Line 341:80: E501 line too long (113 > 79 characters)
Line 345:80: E501 line too long (126 > 79 characters)
Line 347:80: E501 line too long (125 > 79 characters)
Line 351:80: E501 line too long (127 > 79 characters)
Line 355:80: E501 line too long (124 > 79 characters)
Line 359:80: E501 line too long (118 > 79 characters)
Line 363:80: E501 line too long (123 > 79 characters)
Line 365:80: E501 line too long (122 > 79 characters)
Line 369:80: E501 line too long (121 > 79 characters)
Line 373:80: E501 line too long (117 > 79 characters)
Line 375:80: E501 line too long (110 > 79 characters)
Line 379:80: E501 line too long (115 > 79 characters)
Line 385:80: E501 line too long (104 > 79 characters)
Line 386:80: E501 line too long (104 > 79 characters)
Line 390:80: E501 line too long (123 > 79 characters)
Line 391:80: E501 line too long (124 > 79 characters)
Line 393:80: E501 line too long (130 > 79 characters)
Line 397:80: E501 line too long (119 > 79 characters)
Line 398:80: E501 line too long (120 > 79 characters)
Line 400:80: E501 line too long (126 > 79 characters)
Line 404:80: E501 line too long (125 > 79 characters)
Line 406:80: E501 line too long (114 > 79 characters)
Line 410:80: E501 line too long (122 > 79 characters)
Line 411:80: E501 line too long (124 > 79 characters)
Line 413:80: E501 line too long (124 > 79 characters)
Line 414:80: E501 line too long (125 > 79 characters)
Line 416:80: E501 line too long (131 > 79 characters)

Line 234:80: E501 line too long (128 > 79 characters)
Line 235:80: E501 line too long (112 > 79 characters)
Line 236:80: E501 line too long (129 > 79 characters)
Line 237:80: E501 line too long (113 > 79 characters)
Line 238:80: E501 line too long (127 > 79 characters)
Line 239:80: E501 line too long (104 > 79 characters)
Line 240:80: E501 line too long (132 > 79 characters)
Line 241:80: E501 line too long (116 > 79 characters)
Line 242:80: E501 line too long (133 > 79 characters)
Line 243:80: E501 line too long (117 > 79 characters)
Line 244:80: E501 line too long (131 > 79 characters)
Line 245:80: E501 line too long (108 > 79 characters)

Line 255:80: E501 line too long (94 > 79 characters)
Line 256:80: E501 line too long (111 > 79 characters)
Line 260:80: E501 line too long (104 > 79 characters)
Line 264:80: E501 line too long (106 > 79 characters)
Line 266:80: E501 line too long (106 > 79 characters)
Line 270:80: E501 line too long (116 > 79 characters)
Line 272:80: E501 line too long (115 > 79 characters)
Line 276:80: E501 line too long (117 > 79 characters)
Line 280:80: E501 line too long (120 > 79 characters)
Line 284:80: E501 line too long (114 > 79 characters)
Line 288:80: E501 line too long (119 > 79 characters)
Line 290:80: E501 line too long (118 > 79 characters)
Line 294:80: E501 line too long (116 > 79 characters)
Line 298:80: E501 line too long (113 > 79 characters)
Line 300:80: E501 line too long (106 > 79 characters)
Line 304:80: E501 line too long (117 > 79 characters)
Line 310:80: E501 line too long (103 > 79 characters)
Line 314:80: E501 line too long (118 > 79 characters)
Line 316:80: E501 line too long (124 > 79 characters)
Line 320:80: E501 line too long (114 > 79 characters)
Line 322:80: E501 line too long (120 > 79 characters)
Line 326:80: E501 line too long (119 > 79 characters)
Line 328:80: E501 line too long (112 > 79 characters)
Line 332:80: E501 line too long (111 > 79 characters)
Line 334:80: E501 line too long (118 > 79 characters)
Line 336:80: E501 line too long (124 > 79 characters)

Comment last updated at 2022-09-12 20:42:00 UTC

@hollyhan hollyhan added the in progress This PR is not ready for review or merging label Jun 12, 2022
@hollyhan hollyhan requested review from matthewhoffman and xylar June 12, 2022 03:31
@xylar xylar added the land ice label Jun 15, 2022
Copy link
Collaborator

@trhille trhille left a comment

Choose a reason for hiding this comment

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

@hollyhan, this is amazing work! I went through processing ocean thermal forcing, basal melt, and surface mass balance all using this branch, and noted a handful of sticking points in my review. I have not yet gone through all the files, just any that gave me issues while testing it out. This was incredibly useful, and I'm now running the newest Thwaites mesh and optimization with UKESM forcing!

Also, I know you didn't ask for a review from me, but I needed to use this so I figured I might as well review it while I figured it out. :)

Thanks for this amazing new tool!

@hollyhan hollyhan removed the in progress This PR is not ready for review or merging label Aug 10, 2022
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

I'm reviewing some changes here even though I think we should close this PR in favor of #377 because many of these changes aren't in #377 yet. I want to make sure they don't get lost.

So that the keys (file path and names) match the updated original ISMIP6 data repo
Previously, the ocean basal testcase had a config option for the remapping method.
However, as we always want to use the "nearest neighborhood" method for this testcase,
we decide to hard code the method in the main code "process_basal_melt.py" and
remove the config option from the config file.
@hollyhan hollyhan force-pushed the add_ismip6_forcing_process_RACMO branch from a6c35f1 to 52ed5bd Compare November 14, 2022 17:43
@hollyhan hollyhan requested a review from xylar November 14, 2022 17:44
@hollyhan
Copy link
Contributor Author

@xylar

Thanks so much for testing the PR and for making really great suggestions for improving the testgroup!
I've incorporated all of your suggestions - adding a separate step for processing ocean thermal obs, adding metadata to the processed SMB field and downloading the RACMO data from the MALI database.

Thanks :)
Holly

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@hollyhan, I tested today with HadGEM2-ES data and found a few things that still need to be fixed.

Please have a look and I'll test again once these changes are in.

@hollyhan hollyhan requested a review from xylar November 15, 2022 20:57
@hollyhan
Copy link
Contributor Author

Thanks for testing the PR so promptly, @xylar! I have turned in the changes. :)

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

Wonderful, @hollyhan! This has been a long process with a lot of back and forth. Thank you for bearing with it. I just reran my HadGEM2-ES tests and they all ran perfectly (in under 3 minutes total!).

I think this is ready for @matthewhoffman and @trhille to take a look at.

Copy link
Member

@matthewhoffman matthewhoffman left a comment

Choose a reason for hiding this comment

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

@hollyhan , this looks fantastic! I did a cursory review again and I don't see any additional things you haven't already addressed. This has been a lot of work, but it has been very useful to be able to generate these forcings for any any mesh quickly, and adjust to updates and changes in a reproducible way.

Copy link
Collaborator

@trhille trhille left a comment

Choose a reason for hiding this comment

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

Great work, @hollyhan. I added a few minor comments, but I'm happy for this to be merged. I tested it end-to-end for all four tests and did a short forward run on the full AIS-4km mesh using the climatology forcings it produced.

ds.close()

# create a nested dictionary for the ISMIP6 original forcing files including relative path
_file_obs = ["AIS/Ocean_Forcing/climatology_from_obs_1995-2017/obs_thermal_forcing_1995-2017_8km_x_60m.nc"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to make the 'Ocean_Forcing' part of this case-insensitive? It's a little awkward to have to have both an 'Ocean_Forcing' and an 'Ocean_forcing' directory when processing the obs and 2300 files, and it's not immediately apparent to the user why the ocean_thermal_obs case doesn't work when the ocean_thermal case does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@trhille, this is a good point, and it would be ideal to have a case-insensitive directory for the ocean forcing files. The observational climatology file was originally only downloadable from the ISMIP6-2100 GHub endpoint, which is why I put the obs file in the same directory name Ocean_Forcing as that for the 2100 files. But the ISMIP6 committee has recently uploaded the obs data to the 2300 Ghub endpoint as well. I can see how to make the directory for the obs file case insensitive depending on which period_endyear is chosen in the config file in the following PRs I will create after merging this one.

@hollyhan hollyhan force-pushed the add_ismip6_forcing_process_RACMO branch from 816c401 to 867bab7 Compare November 22, 2022 03:48
@hollyhan
Copy link
Contributor Author

Great work, @hollyhan. I added a few minor comments, but I'm happy for this to be merged. I tested it end-to-end for all four tests and did a short forward run on the full AIS-4km mesh using the climatology forcings it produced.

Thanks so much for catching the silly typos with careful inspection, @trhille! I fixed all of them and updated the PR!

@hollyhan
Copy link
Contributor Author

Hi @xylar, @trhille, @matthewhoffman,

Thank you all so much for helping me through this PR, which involved multiple rounds of thorough reviews and giving constructive feedbacks! I've updated the PR with the last comments provided by Trevor above.

@xylar
Copy link
Collaborator

xylar commented Nov 22, 2022

I created #462 to keep track of @trhille and @hollyhan's last unaddressed point.

@xylar xylar merged commit b23116a into MPAS-Dev:master Nov 22, 2022
@xylar
Copy link
Collaborator

xylar commented Nov 22, 2022

Congratulation, @hollyhan!

@trhille
Copy link
Collaborator

trhille commented Nov 22, 2022

Yes, awesome work @hollyhan! This is such a great tool!

@hollyhan hollyhan deleted the add_ismip6_forcing_process_RACMO branch November 28, 2022 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request land ice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants