{"id":15904185,"url":"https://github.com/adamjstewart/bathymetry","last_synced_at":"2026-02-19T05:31:43.589Z","repository":{"id":213549225,"uuid":"259502931","full_name":"adamjstewart/bathymetry","owner":"adamjstewart","description":":ocean: Machine learning model for predicting ocean bathymetry","archived":false,"fork":false,"pushed_at":"2025-10-06T10:52:32.000Z","size":243,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-06T12:28:30.874Z","etag":null,"topics":["bathymetry","crust","geodynamics","machine-learning"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamjstewart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-28T01:49:43.000Z","updated_at":"2025-10-06T10:52:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f834409c-35b9-4267-864b-0862594b2591","html_url":"https://github.com/adamjstewart/bathymetry","commit_stats":{"total_commits":173,"total_committers":1,"mean_commits":173.0,"dds":0.0,"last_synced_commit":"924ac05d8bcca87d0fecafcb8f64488819351853"},"previous_names":["adamjstewart/bathymetry"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamjstewart/bathymetry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjstewart%2Fbathymetry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjstewart%2Fbathymetry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjstewart%2Fbathymetry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjstewart%2Fbathymetry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamjstewart","download_url":"https://codeload.github.com/adamjstewart/bathymetry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamjstewart%2Fbathymetry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bathymetry","crust","geodynamics","machine-learning"],"created_at":"2024-10-06T12:22:00.732Z","updated_at":"2026-02-19T05:31:43.584Z","avatar_url":"https://github.com/adamjstewart.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bathymetry\n:ocean: Machine learning model for predicting ocean bathymetry\n\n[![ruff](https://github.com/adamjstewart/bathymetry/actions/workflows/ruff.yaml/badge.svg)](https://github.com/adamjstewart/bathymetry/actions/workflows/ruff.yaml)\n[![mypy](https://github.com/adamjstewart/bathymetry/actions/workflows/mypy.yaml/badge.svg)](https://github.com/adamjstewart/bathymetry/actions/workflows/mypy.yaml)\n\n## System Requirements\n\nThe versions listed below are what was used in our paper. Newer or older versions may also work. If you encounter any issues with newer versions, please open an issue.\n\n### Software Dependencies\n\n* Python 3.13.7\n* cartopy 0.25.0\n* cmocean 4.0.3\n* geocube 0.7.1\n* geopandas 1.1.1\n* matplotlib 3.10.6\n* netcdf4 1.7.2\n* numpy 2.3.3\n* pandas 2.3.3\n* scikit-learn 1.7.2\n* scipy 1.16.2\n* shapely 2.1.2\n* xarray 2025.9.1\n\n### Operating Systems\n\n* macOS 15.6.1\n* Ubuntu 22.04.3\n\n### Hardware Requirements\n\nShould run on any CPU or RAM size, including on a laptop\n\n## Installation Guide\n\nFirst, clone this project:\n```console\n\u003e git clone https://github.com/adamjstewart/bathymetry.git\n\u003e cd bathymetry\n```\nThen, install the Python dependencies:\n```console\n\u003e pip install -r requirements.txt\n```\nThis should only take a few seconds to install.\n\n## Data\n\nAll data should be stored in the same root directory. The default is `data`, but a different directory can be specified with `--data-dir`.\n\n### CRUST1.0\n\nThis model is trained on the [CRUST1.0](https://igppweb.ucsd.edu/~gabi/crust1.html) dataset. In order to reproduce this work, you will need to download both the [basic model](http://igppweb.ucsd.edu/~gabi/crust1/crust1.0.tar.gz) and the [add-on](http://igppweb.ucsd.edu/~gabi/crust1/crust1.0-addon.tar.gz) that includes the crustal type file. Then, extract the tarballs in a `crust1.0` directory within the data directory.\n\n### Seafloor Age\n\nSeafloor age data can be found at [EarthByte](https://www.earthbyte.org/category/resources/data-models/seafloor-age/). For this model, we downsample all seafloor age data to 1-degree resolution. We test with several different seafloor age datasets:\n\n* [age2020](https://www.earthbyte.org/webdav/ftp/earthbyte/agegrid/2020/Grids/age.2020.1.GTS2012.6m.nc)\n* [age2019](https://www.earthbyte.org/webdav/ftp/Data_Collections/Muller_etal_2019_Tectonics/Muller_etal_2019_Agegrids/Muller_etal_2019_Tectonics_v2.0_PresentDay_AgeGrid.nc)\n* [age2016](https://www.earthbyte.org/webdav/ftp/Data_Collections/Muller_etal_2016_AREPS/Muller_etal_2016_AREPS_Agegrids/Muller_etal_2016_AREPS_Agegrids_v1.17/Muller_etal_2016_AREPS_v1.17_PresentDay_AgeGrid.nc)\n* [age2013](https://www.earthbyte.org/webdav/ftp/papers/Muller_etal_OceanChemistry/Grids/agegrid_0.nc)\n* [age2008](https://www.earthbyte.org/webdav/ftp/Data_Collections/Muller_etal_2008_G3/Seafloor_ages/age.3.6.unscaled.nc)\n\nEach of these files should be placed in their respective directories within the data directory.\n\n### Plate Boundaries\n\nThe plate boundaries shapefiles can be downloaded from the [World tectonic plates and boundaries](https://github.com/fraxen/tectonicplates). Download and extract a zip file of the entire repository within the data directory.\n\n## Demo\n\nTo train a ridge regression model, run the following command:\n```console\n\u003e python3 train.py ridge\n\nReading datasets...\nReading data/age2020/age.2020.1.GTS2012.6m.nc...\nReading data/crust1.0/crust1.bnds...\nReading data/crust1.0/crust1.vp...\nReading data/crust1.0/crust1.vs...\nReading data/crust1.0/crust1.rho...\nReading data/crust1.0/CNtype1-1.txt...\nReading data/tectonicplates-master/PB2002_plates.shp...\n\nPreprocessing...\n\nCross-validation...\nGroup 1\nGroup 2\nGroup 3\nGroup 4\nGroup 5\nGroup 6\nGroup 7\n\nEvaluating...\nRMSE: 0.591818050597389\nR^2:  0.7508725821083216\n\nSaving predictions...\nWriting checkpoints/checkpoint-ridge-100-True-False-None-False-1-auto-0.0001.pickle...\nWriting checkpoints/truth.nc...\nWriting checkpoints/ridge.nc...\n```\nThis should only take a few seconds to run. Replace \"ridge\" with other models to compare performance metrics. Note that MLP will take much longer (around an hour on a laptop).\n\n## Reproducibility\n\nTo reproduce all experimental results from our paper, see the scripts in the `jobs` directory. Specifically:\n\n* `ridge.sh`, `svr.sh`, `mlp.sh`: find optimal hyperparameters for all models\n* `train.sh`: reproduce results with optimal hyperparameters\n* `ablation.sh`: feature and layer ablation study\n* `plot.sh`: generate some basic maps of the results\n\nThese jobs were submitted using the Slurm Workload Manager on TACC and ICCP. The scripts should work on any system, but may be slow unless you use a cluster. If you use a different cluster, you may need to change the job configuration parameters.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamjstewart%2Fbathymetry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamjstewart%2Fbathymetry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamjstewart%2Fbathymetry/lists"}