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

Fix land mask around antarctic regions #1

Merged
merged 3 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion make_topog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@ cd topogtools
./build.sh
cd -

./topogtools/editTopo.py --overwrite --nogui --apply ocean_mask_edits.txt --output ocean_mask.nc ocean_mask_original.nc mask # see https://github.com/COSIMA/access-om2/issues/210
# Creation of topography file
./topogtools/float_vgrid # this overwrites ocean_vgrid.nc
# ./topogtools/gen_topo # generates topog_new.nc; takes about 2 hours at 0.25 deg, so must be run via qsub of this script
./topogtools/editTopo.py --overwrite --nogui --apply topog_edits.txt --output topog_new_edited.nc topog_new.nc
./topogtools/deseas topog_new_edited.nc topog_new_edited_deseas.nc # remove seas
cp topog_new_edited_deseas.nc topog_new_edited_deseas_partialcell.nc
./topogtools/do_partial_cells topog_new_edited_deseas_partialcell.nc 1.0 0.2 # this overwrites its input, so we make copy in prev line
./topogtools/min_max_depth topog_new_edited_deseas_partialcell.nc topog_new_edited_deseas_partialcell_mindepth.nc 4 # can produce non-advective cells

# Creation of land mask file
./topogtools/topog2mask.py topog_new.nc dummy.nc ocean_mask_gebco.nc 0.5 # Creates new mask for the GEBCO 2014 topography
./topogtools/combine_masks.py ocean_mask_original.nc ocean_mask_gebco.nc ocean_hgrid.nc ocean_mask_fixed.nc -60 # Combine new mask with original one, taking the new one for the antarctic region
./topogtools/editTopo.py --overwrite --nogui --apply ocean_mask_edits.txt --output ocean_mask_fixed_edited.nc ocean_mask_fixed.nc mask # see https://github.com/COSIMA/access-om2/issues/210
./topogtools/fix_nonadvective_mask.py ocean_mask_fixed_edited.nc ocean_mask.nc # automatically fix non-advective cells

# Application of the land mask and fixing of nonadvective cells
./topogtools/apply_mask.py topog_new_edited_deseas_partialcell_mindepth.nc ocean_mask.nc topog_new_edited_deseas_partialcell_mindepth_masked.nc # applies ocean_mask.nc
./topogtools/fix_nonadvective_mosaic topog_new_edited_deseas_partialcell_mindepth_masked.nc topog_new_edited_deseas_partialcell_mindepth_masked_fixnonadvective.nc # automatically fix non-advective cells
./topogtools/check_nonadvective_mosaic topog_new_edited_deseas_partialcell_mindepth_masked_fixnonadvective.nc
Expand Down
9 changes: 9 additions & 0 deletions ocean_mask_edits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ editTopo.py edits file version 1
246 741 0.0 1.0 # Open choked channel west of Sakhalin (Strait of Tartary)
818 1079 1.0 0.0 # Canadian Arctic: remove non-advective cell
893 737 0.0 1.0 # Open choked channel west of Newfoundland (Strait of Belle Isle)
#
# created: Thu Sep 8 14:25:30 2022
# by: mo1833
# via: ./topogtools/editTopo.py ocean_mask_fixed.nc mask
#
# Remove 1 non-advective edge by removing an island on the Antarctic coast.
#
# i j old new
850 135 0.0 1.0