Makes 0.25-degree (25km) topog.nc MOM6 global bathymetry file for ACCESS-OM3-25km, based on the GEBCO 2024 dataset.
The workflow gen_topo.sh contains many steps, and stores intermediate files in topography_intermediate_output so you can check the result of each step. Key stages in the processing are:
- Interpolate GEBCO onto the model grid, setting each cell's altitude to the mean of the GEBCO data within it and setting cells that contain more than 50% land in GEBCO to 100% land in the model (this rule of thumb gives acceptable results in most places but requires some specific fixes to ensure important straits, sills, etc. are well represented).
- Create two global topographies, one (
topog_new_fillfraction_edited_deseas.nc) with a coastline suitable for a C-grid (i.e. with 1-cell-wide channels) and another (topog_new_fillfraction_B_edited_fixnonadvective_deseas.nc) with a coastline suitable for both a B-grid and C-grid (i.e. all 1-cell-wide channels are closed off or widened to at least 2 cells); these are identical apart from coastal points and any embayments/channels that are cut off by closing 1-cell-wide channels in the B-grid version. - These are then merged with
combine_by_mask.pyusing the maskB_mask.ncsuch the B-grid version is used in regions prone to sea ice and the C-grid version everywhere else. This allows the use of B-grid CICE6 with C-grid MOM6 without ice piling up in narrow channels and inlets. - Further processing and edits to generate the final
topog.nc. - Generation of associated .nc files based on and consistent with
topog.nc.
-
Download to Gadi
This repository contains submodules, so clone with
git clone --recursive https://github.com/ACCESS-NRI/make_OM3_025deg_topo.git cd make_OM3_025deg_topo -
(optional) Regenerate B-grid mask
B_mask.nccan be updated withmake_B_mask.ipynbif needed- run
make_B_mask.ipynbon ARE and check it looks like what you want - move
~/B_mask.ncto topog generation directory so it can be used in workflow - run
finalise_B_mask.shto embed its provenance
- run
-
Generate Topography Use
./gen_topo.shto generate the topography and associated files. For 0.25-degree (25km) resolution or finer, this will require submission viaqsub.- add gdata for your project & working directory to the
#PBS -l storage=line ingen_topo.sh - check/adjust
INPUT_HGRID,INPUT_VGRIDandINPUT_GEBCOin bothgen_topo.shandfinalise.sh - submit the script:
qsub gen_topo.sh
- add gdata for your project & working directory to the
-
Check the output files look OK
- See whether the final topography
topog.ncand associated .nc files look OK. Look carefully for any missing marginal seas, and channels that are too wide or narrow/closed. If there's a problem, you can identify where it arose by inspecting the intermediate outputs intopography_intermediate_output. - Run
non-advective.ipynbon ARE to see the B-grid changes in the polar coastlines, and check there are no seas/bays without B-grid advective connection to the ocean intopography_intermediate_output/topog_new_fillfraction_B_edited_fixnonadvective_deseas.nc.
- See whether the final topography
-
Fix problems (if any)
Since all outputs are generated from
topog.nc, problems in any of the outputs can generally be fixed by altering the edits applied as part of generatingtopog.ncin the workflow. There are two files containing lists of edits, which are applied byeditTopo.pyingen_topo.sh:edit_025deg_topog.txtis applied twice, once to the precursor to the B- and C-grid files which are later merged, and then again to the merged file.edit_025deg_topog_Bgrid.txtis applied only to the B-grid file prior to merging but after the first application ofedit_025deg_topog.txt. This should apply fixes that are suitable for a global B-grid, e.g. to open the Bosphorus so the Black Sea is retained.- Run
bathymetry-tools/editTopo.pyon the appropriate intermediate files to generate new lists of edits which can be appended (with explanatory comments) toedit_025deg_topog.txtoredit_025deg_topog_Bgrid.txtto make them part of the workflow. - Return to step 3 to check that the updated workflow does what you want.
-
Finalise Output Files
Once the output files meet your satisfaction, commit and push the changes, then run
finalise.shto add the git commit hash as metadata in the output.ncfiles for provenance.
This workflow relies on the xp65 conda environments for running the scripts and generating the outputs. As long as you are a member of the xp65 project, this conda environment is loaded as part of the scripts.