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

Big bug in panan runoff forcing #53

Open
schmidt-christina opened this issue Dec 14, 2024 · 7 comments
Open

Big bug in panan runoff forcing #53

schmidt-christina opened this issue Dec 14, 2024 · 7 comments

Comments

@schmidt-christina
Copy link
Collaborator

@adele-morrison discovered a bug in the runoff forcing for the panan-005. The total Antarctic runoff applied to the 1/10th panan is 0.08746723 Sv, in agreement with JRA55-do/Depoorter. But in the 1/20th panan, the Antarctic runoff only sums to around 70% of this: 0.06007163 Sv. (see /g/data/g40/akm157/jupyter_scripts/panan_meltwater/compare_runoff_panan01_panan005.ipynb)

@willaguiar checked the runoff in the 1.40°: panan0025 is just a little larger than panan005 (
0.06179837 Sv), but still about 70% of panan01

@schmidt-christina
Copy link
Collaborator Author

We will now rerun the 1/20° with fixed runoff. Hopefully starting the runs Monday as I am on a very tight timeline until thesis submission and this run was the backbone of my 2nd chapter.

Problem:

  1. runoff not in all coastal cells (big gaps along coastline)
  2. runoff not only in coastal cells (sometimes spread over up to 0.25° north)
  3. strengths of runoff varies way more than it should along the coastline I think

See example for some coastline in the Atlantic sector
image

Question to everyone more familiar with the runoff regridding business: @angus-g @AndyHoggANU @adele-morrison @aekiss:

Do we want to regrid the runoff so that it's spread only over the coastal cells (i.e cells directly next to land cells) but not further offshore?

Code for regridding runoff we found

  1. https://github.com/angus-g/runoff-rs by @angus-g written in Rust, a language we haven't used before, making it a bit difficult to understand completely what is being done and how to fix it
  2. /g/data/ik11/inputs/mom6/regrid_runoff.regrid_runoff.py by @AndyHoggANU which looks similar at first glance, @willaguiar and I will give this a try

@AndyHoggANU
Copy link
Contributor

Hi Christina,

A couple of things about this:

  • I know this is a pain for your thesis, but my recollection is that our initial runs at 1/20° (which used the same land-sea mask as the 1/10° and so presumably got the runoff right) had better DSW formation. So my guess is that you will likely see better DSW at 1/20th even after you add the runoff back in. Unfortunately, we deleted all those old runs when the new runs came out, so you are relying on my imperfect memory here ...
  • Yes, we did use that regard_runoff.py script for the 0.1°. But I don't think I wrote it (even though I seem to own the file). My suspicion is that @angus-g wrote it, but I'll leave it up to him to confirm or deny.

Good luck, keep us all posted!

@angus-g
Copy link
Collaborator

angus-g commented Dec 15, 2024

Yes, we did use that regard_runoff.py script for the 0.1°. But I don't think I wrote it (even though I seem to own the file). My suspicion is that @angus-g wrote it, but I'll leave it up to him to confirm or deny.

I think that script was a modification of Alistair's but just with some performance improvements since it either crashed or was too slow to use on the high resolution domains.

@schmidt-christina
Copy link
Collaborator Author

schmidt-christina commented Dec 16, 2024

We couldn't get the python script to work, it would just run forever (until it hit the walltime of 24 hours) and not produce anything. But I got the notebook we found in that same folder to work by

  • modifying it so that it computes the runoff for 5° longitude slices
  • parallelizing a few functions (with the help of chatgpt)
  • converting it to a py script and running all longitude slices in parallel
  • merge all files into one

This is for sure the quick and dirty way but the difference to the panan01 runoff is -8e-9 Sv and to the JRA runoff 6.5e-16 Sv.

New file is here /g/data/ik11/inputs/mom6/panan/005deg/20241214/runoff.nc

The python script is here '/g/data/e14/cs6673/mom6_comparison/Python_scripts/runoff_regridding_fixed.py'

@willaguiar wrote a script and is double checking the runoff atm.

Comparison with JRA:

Picture 1

Comparison with panan01:
Picture 2

@willaguiar
Copy link
Collaborator

I doubled checked now the new file /g/data/e14/cs6673/mom6_comparison/data_runoff/runoff_panan005_fixed_regridding.nc.

The total runoff now seems reasonable to be ( panan01: 0.08746723 Sv, panan005: 0.08746722 Sv). The distribution of runoff fluxes along the longitude is also fairly similar:

Screenshot 2024-12-16 at 11 49 58 AM

@schmidt-christina
Copy link
Collaborator Author

The new runoff for the 1/40° is 0.08746722408999512 Sv and the file is /g/data/ik11/inputs/mom6/panan/0025deg/20241214/runoff.nc

@willaguiar
Copy link
Collaborator

I find the same runoff (0.087467 Sv) for panan0025 and the distribution is the same as panan01, and panan005 too. Ill now rerun panan0025.... Thanks Christina!
Screenshot 2024-12-17 at 9 14 03 AM

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

No branches or pull requests

4 participants