Regrid iceberg fluxes on OM3 grid#120
Merged
Merged
Conversation
|
This pull request has been mentioned on ACCESS Hive Community Forum. There might be relevant details there: https://forum.access-hive.org.au/t/access-om3-development-highlights-updates/5902/3 |
dougiesquire
requested changes
Apr 15, 2026
Collaborator
There was a problem hiding this comment.
@anton-seaice, I tried to run this and got:
$ python3 generate_rofi_pattern.py --topog-file=/g/data/vk83/configurations/inputs/access-om3/share/grids/global.100km/2020.10.22/topog.nc --hgrid-filename=/g/data/vk83/configurations/inputs/access-om3/mom/grids/mosaic/global.100km/2020.05.30/ocean_hgrid.nc --output-filename=./test.nc
/g/data/xp65/public/apps/med_conda/envs/analysis3-26.03/lib/python3.12/site-packages/xesmf/backend.py:42: UserWarning: Input array is not F_CONTIGUOUS. Will affect performance.
warnings.warn('Input array is not F_CONTIGUOUS. ' 'Will affect performance.')
/g/data/xp65/public/apps/med_conda/envs/analysis3-26.03/lib/python3.12/site-packages/xesmf/backend.py:42: UserWarning: Input array is not F_CONTIGUOUS. Will affect performance.
warnings.warn('Input array is not F_CONTIGUOUS. ' 'Will affect performance.')
Traceback (most recent call last):
File "/g/data/tm70/ds0092/software/om3-scripts/rof_pattern_generation/generate_rofi_pattern.py", line 229, in <module>
main()
File "/g/data/tm70/ds0092/software/om3-scripts/rof_pattern_generation/generate_rofi_pattern.py", line 172, in main
weights_da = move_runoff_on_land(regrid.grid_dest, mask, forcing_regrid_glob)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/g/data/tm70/ds0092/software/om3-scripts/rof_pattern_generation/generate_rofi_pattern.py", line 67, in move_runoff_on_land
grid_dest["mask"] = xr.DataArray(mask, dims=["ny", "nx"])
^^^^^^^^^
NameError: name 'grid_dest' is not defined. Did you mean: 'grid_mask'?
Co-authored-by: Dougie Squire <dougie.squire@anu.edu.au>
Contributor
Author
|
I've re-run after the changes, and checked it produces the same netcdf files as previously for both the rof pattern and SFe forcing file. |
Contributor
Author
|
Thanks @dougiesquire - ready for another look |
Contributor
Author
|
Should be ready @dougiesquire |
dougiesquire
approved these changes
Apr 24, 2026
Collaborator
dougiesquire
left a comment
There was a problem hiding this comment.
Thanks @anton-seaice looks good (assuming you've tested using the latest version of the code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #119
This change adds a script to regrid iceberg flux climatology onto the OM3 grid.
The two input files are hardcoded:
AQ_MELT_PATTERN = "/g/data/av17/access-nri/OM3/Mankoff_2025_V9/AQ_iceberg_melt.nc"
GL_MELT_PATTERN = "/g/data/av17/access-nri/OM3/Mankoff_2025_V9/GL_iceberg_melt.nc"
and in the script, the melt pattern is combined for all regions, and hemispheres.
Example output in
/g/data/tm70/as2285/making_inputs/om3-scripts/rof_pattern_generation/access-om3-100km-rofi-spread.ncI've refactored regrid_forcing.py to generalise it a little and move into a separate file.
I regenerated SFe_Hamiltonetal2020_monthly_clim and checked the results matched: