From 9de5e07762356765e28c9657a5c7dc130193b1f8 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 19 Nov 2022 08:09:15 -0500 Subject: [PATCH 01/14] add earth_magnetic_anomaly.py --- pygmt/datasets/__init__.py | 1 + pygmt/datasets/earth_magnetic_anomaly.py | 107 +++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 pygmt/datasets/earth_magnetic_anomaly.py diff --git a/pygmt/datasets/__init__.py b/pygmt/datasets/__init__.py index 93b7210a73e..25f29b67af5 100644 --- a/pygmt/datasets/__init__.py +++ b/pygmt/datasets/__init__.py @@ -3,6 +3,7 @@ # Load sample data included with GMT (downloaded from the GMT cache server). from pygmt.datasets.earth_age import load_earth_age +from pygmt.datasets.earth_magnetic_anomaly import load_earth_magnetic_anomaly from pygmt.datasets.earth_relief import load_earth_relief from pygmt.datasets.samples import ( list_sample_data, diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py new file mode 100644 index 00000000000..ccb8455ef74 --- /dev/null +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -0,0 +1,107 @@ +""" +Function to download the Earth seafloor age datasets from the GMT data server, +and load as :class:`xarray.DataArray`. + +The grids are available in various resolutions. +""" +from pygmt.exceptions import GMTInvalidInput +from pygmt.helpers import kwargs_to_strings +from pygmt.io import load_dataarray +from pygmt.src import grdcut, which + + +@kwargs_to_strings(region="sequence") +def load_earth_magnetic_anomaly(resolution="01d", region=None, registration=None): + r""" + Load an Earth magnetic anomaly grid in various resolutions. + + The grids are downloaded to a user data directory + (usually ``~/.gmt/server/earth/earth_mag/``) the first time you invoke + this function. Afterwards, it will load the grid from the data directory. + So you'll need an internet connection the first time around. + + These grids can also be accessed by passing in the file name + **@earth_mag**\_\ *res*\[_\ *reg*] to any grid plotting/processing + function. *res* is the grid resolution (see below), and *reg* is grid + registration type (**p** for pixel registration or **g** for gridline + registration). + + Refer to :gmt-datasets:`earth-mag.html` for more details. + + Parameters + ---------- + resolution : str + The grid resolution. The suffix ``d`` and ``m`` stand for + arc-degree and arc-minute. It can be ``"01d"``, ``"30m"``, + ``"20m"``, ``"15m"``, ``"10m"``, ``"06m"``, ``"05m"``, ``"04m"``, + ``"03m"``, or ``"02m"``. + + region : str or list + The subregion of the grid to load, in the forms of a list + [*xmin*, *xmax*, *ymin*, *ymax*] or a string *xmin/xmax/ymin/ymax*. + Required for grids with resolutions higher than 5 + arc-minute (i.e., ``"05m"``). + + registration : str + Grid registration type. Either ``"pixel"`` for pixel registration or + ``"gridline"`` for gridline registration. Default is ``None``, where + a pixel-registered grid is returned unless only the + gridline-registered grid is available. + + Returns + ------- + grid : :class:`xarray.DataArray` + The Earth seafloor crustal age grid. Coordinates are latitude and + longitude in degrees. Age is in millions of years (Myr). + + Note + ---- + The :class:`xarray.DataArray` grid doesn't support slice operation, for + Earth seafloor crustal age with resolutions of 5 arc-minutes or higher, + which are stored as smaller tiles. + """ + + # Earth magnetic anomaly data stored as single grids for low resolutions + non_tiled_resolutions = ["01d", "30m", "20m", "15m", "10m", "06m"] + # Earth magnetic anomaly data stored as tiles for high resolutions + tiled_resolutions = ["05m", "04m", "03m", "02m"] + + if registration in ("pixel", "gridline", None): + # If None, let GMT decide on Pixel/Gridline type + reg = f"_{registration[0]}" if registration else "" + else: + raise GMTInvalidInput( + f"Invalid grid registration: '{registration}', should be either " + "'pixel', 'gridline' or None. Default is None, where a " + "pixel-registered grid is returned unless only the " + "gridline-registered grid is available." + ) + + if resolution not in non_tiled_resolutions + tiled_resolutions: + raise GMTInvalidInput(f"Invalid Earth relief resolution '{resolution}'.") + + # Choose earth relief data prefix + earth_mag_prefix = "earth_mag_" + + # different ways to load tiled and non-tiled earth relief data + # Known issue: tiled grids don't support slice operation + # See https://github.com/GenericMappingTools/pygmt/issues/524 + if region is None: + if resolution not in non_tiled_resolutions: + raise GMTInvalidInput( + f"'region' is required for Earth magnetic anomaly resolution '{resolution}'." + ) + fname = which(f"@{earth_mag_prefix}{resolution}{reg}", download="a") + grid = load_dataarray(fname, engine="netcdf4") + else: + grid = grdcut(f"@{earth_mag_prefix}{resolution}{reg}", region=region) + + # Add metadata to the grid + grid.name = "magnetic_anomaly" + # Remove the actual range because it gets outdated when indexing the grid, + # which causes problems when exporting it to netCDF for usage on the + # command-line. + grid.attrs.pop("actual_range") + for coord in grid.coords: + grid[coord].attrs.pop("actual_range") + return grid From 6de890d1df30609dd58bfd405aa66d6b66390fbb Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 19 Nov 2022 10:21:40 -0500 Subject: [PATCH 02/14] add test_datasets_earth_magnetic_anomaly.py --- .../test_datasets_earth_magnetic_anomaly.py | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 pygmt/tests/test_datasets_earth_magnetic_anomaly.py diff --git a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py new file mode 100644 index 00000000000..7ede743729b --- /dev/null +++ b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py @@ -0,0 +1,78 @@ +""" +Test basic functionality for loading Earth magnetic anomaly datasets. +""" +import numpy as np +import numpy.testing as npt +import pytest +from pygmt.datasets import load_earth_magnetic_anomaly +from pygmt.exceptions import GMTInvalidInput + + +def test_earth_mag_fails(): + """ + Make sure earth_magnetic_anomaly fails for invalid resolutions. + """ + resolutions = "1m 1d bla 60d 001m 03".split() + resolutions.append(60) + for resolution in resolutions: + with pytest.raises(GMTInvalidInput): + load_earth_magnetic_anomaly(resolution=resolution) + + +def test_earth_mag_incorrect_registration(): + """ + Test loading earth_magnetic_anomaly with incorrect registration type. + """ + with pytest.raises(GMTInvalidInput): + load_earth_magnetic_anomaly(registration="improper_type") + + +def test_earth_mag_01d(): + """ + Test some properties of the magnetic anomaly 01d data. + """ + data = load_earth_magnetic_anomaly(resolution="01d", registration="gridline") + assert data.name == "magnetic_anomaly" + assert data.attrs["long_name"] == "anomaly (nT)" + assert data.shape == (181, 361) + npt.assert_allclose(data.lat, np.arange(-90, 91, 1)) + npt.assert_allclose(data.lon, np.arange(-180, 181, 1)) + npt.assert_allclose(data.min(), -384) + npt.assert_allclose(data.max(), 1057.2) + + +def test_earth_mag_01d_with_region(): + """ + Test loading low-resolution earth magnetic anomaly with 'region'. + """ + data = load_earth_magnetic_anomaly( + resolution="01d", region=[-10, 10, -5, 5], registration="gridline" + ) + assert data.shape == (11, 21) + npt.assert_allclose(data.lat, np.arange(-5, 6, 1)) + npt.assert_allclose(data.lon, np.arange(-10, 11, 1)) + npt.assert_allclose(data.min(), -180.40002) + npt.assert_allclose(data.max(), 127.39996) + + +def test_earth_mag_04m_with_region(): + """ + Test loading a subregion of high-resolution earth magnetic anomaly data. + """ + data = load_earth_magnetic_anomaly( + resolution="03m", region=[-115, -112, 4, 6], registration="gridline" + ) + assert data.shape == (41, 61) + npt.assert_allclose(data.lat, np.arange(4, 6.01, 0.05)) + npt.assert_allclose(data.lon, np.arange(-115, -111.99, 0.05)) + npt.assert_allclose(data.data.min(), -193) + npt.assert_allclose(data.data.max(), 110) + + +def test_earth_mag_05m_without_region(): + """ + Test loading high-resolution earth magnetic anomaly without passing + 'region'. + """ + with pytest.raises(GMTInvalidInput): + load_earth_magnetic_anomaly("05m") From aeebb6a0582d4dbc05afdd56994b1e95809da943 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 07:47:26 -0500 Subject: [PATCH 03/14] Apply suggestions from code review Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- pygmt/datasets/earth_magnetic_anomaly.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index ccb8455ef74..8b3737ad616 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -1,5 +1,5 @@ """ -Function to download the Earth seafloor age datasets from the GMT data server, +Function to download the Earth magnetic anomaly datasets from the GMT data server, and load as :class:`xarray.DataArray`. The grids are available in various resolutions. @@ -51,13 +51,13 @@ def load_earth_magnetic_anomaly(resolution="01d", region=None, registration=None Returns ------- grid : :class:`xarray.DataArray` - The Earth seafloor crustal age grid. Coordinates are latitude and + The Earth magnetic anomaly grid. Coordinates are latitude and longitude in degrees. Age is in millions of years (Myr). Note ---- The :class:`xarray.DataArray` grid doesn't support slice operation, for - Earth seafloor crustal age with resolutions of 5 arc-minutes or higher, + Earth magnetic anomaly with resolutions of 5 arc-minutes or higher, which are stored as smaller tiles. """ From 0ac7afbbfc4bbc6915dc7600e99a303010c354b2 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 09:32:53 -0500 Subject: [PATCH 04/14] add magnetic anomaly to index.rst --- doc/api/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/index.rst b/doc/api/index.rst index 40f6fc8fad4..68d2cb85876 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -222,6 +222,7 @@ and store them in the GMT cache folder. datasets.list_sample_data datasets.load_earth_age + datasets.load_earth_magnetic_anomaly datasets.load_earth_relief datasets.load_sample_data datasets.load_fractures_compilation From 0a22439ef66966b1688f8bff8aa231a5f0d04d58 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 09:45:38 -0500 Subject: [PATCH 05/14] integrate load_remote_dataset.py into earth_magnetic_anomaly.py --- pygmt/datasets/earth_magnetic_anomaly.py | 61 ++++++------------------ pygmt/datasets/load_remote_dataset.py | 19 ++++++++ 2 files changed, 33 insertions(+), 47 deletions(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index 8b3737ad616..7816a93854c 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -1,13 +1,11 @@ """ -Function to download the Earth magnetic anomaly datasets from the GMT data server, -and load as :class:`xarray.DataArray`. +Function to download the Earth magnetic anomaly datasets from the GMT data +server, and load as :class:`xarray.DataArray`. The grids are available in various resolutions. """ -from pygmt.exceptions import GMTInvalidInput +from pygmt.datasets.load_remote_dataset import _load_remote_dataset from pygmt.helpers import kwargs_to_strings -from pygmt.io import load_dataarray -from pygmt.src import grdcut, which @kwargs_to_strings(region="sequence") @@ -52,7 +50,7 @@ def load_earth_magnetic_anomaly(resolution="01d", region=None, registration=None ------- grid : :class:`xarray.DataArray` The Earth magnetic anomaly grid. Coordinates are latitude and - longitude in degrees. Age is in millions of years (Myr). + longitude in degrees. Units are in nano Teslas (nT). Note ---- @@ -61,47 +59,16 @@ def load_earth_magnetic_anomaly(resolution="01d", region=None, registration=None which are stored as smaller tiles. """ - # Earth magnetic anomaly data stored as single grids for low resolutions - non_tiled_resolutions = ["01d", "30m", "20m", "15m", "10m", "06m"] - # Earth magnetic anomaly data stored as tiles for high resolutions - tiled_resolutions = ["05m", "04m", "03m", "02m"] + # Choose earth magnetic anomaly data prefix + dataset_prefix = "earth_mag_" - if registration in ("pixel", "gridline", None): - # If None, let GMT decide on Pixel/Gridline type - reg = f"_{registration[0]}" if registration else "" - else: - raise GMTInvalidInput( - f"Invalid grid registration: '{registration}', should be either " - "'pixel', 'gridline' or None. Default is None, where a " - "pixel-registered grid is returned unless only the " - "gridline-registered grid is available." - ) + dataset_name = "earth_magnetic_anomaly" - if resolution not in non_tiled_resolutions + tiled_resolutions: - raise GMTInvalidInput(f"Invalid Earth relief resolution '{resolution}'.") - - # Choose earth relief data prefix - earth_mag_prefix = "earth_mag_" - - # different ways to load tiled and non-tiled earth relief data - # Known issue: tiled grids don't support slice operation - # See https://github.com/GenericMappingTools/pygmt/issues/524 - if region is None: - if resolution not in non_tiled_resolutions: - raise GMTInvalidInput( - f"'region' is required for Earth magnetic anomaly resolution '{resolution}'." - ) - fname = which(f"@{earth_mag_prefix}{resolution}{reg}", download="a") - grid = load_dataarray(fname, engine="netcdf4") - else: - grid = grdcut(f"@{earth_mag_prefix}{resolution}{reg}", region=region) - - # Add metadata to the grid - grid.name = "magnetic_anomaly" - # Remove the actual range because it gets outdated when indexing the grid, - # which causes problems when exporting it to netCDF for usage on the - # command-line. - grid.attrs.pop("actual_range") - for coord in grid.coords: - grid[coord].attrs.pop("actual_range") + grid = _load_remote_dataset( + dataset_name=dataset_name, + dataset_prefix=dataset_prefix, + resolution=resolution, + region=region, + registration=registration, + ) return grid diff --git a/pygmt/datasets/load_remote_dataset.py b/pygmt/datasets/load_remote_dataset.py index a60ccb85423..c31e85daff5 100644 --- a/pygmt/datasets/load_remote_dataset.py +++ b/pygmt/datasets/load_remote_dataset.py @@ -108,6 +108,25 @@ class GMTRemoteDataset(NamedTuple): "01m": Resolution(["gridline"], True), }, ), + "earth_magnetic_anomaly": GMTRemoteDataset( + title="Earth magnetic anomaly", + name="magnetic_anomaly", + long_name="Earth magnetic anomaly", + units="nT", + extra_attributes={"horizontal_datum": "WGS84"}, + resolutions={ + "01d": Resolution(["pixel", "gridline"], False), + "30m": Resolution(["pixel", "gridline"], False), + "20m": Resolution(["pixel", "gridline"], False), + "15m": Resolution(["pixel", "gridline"], False), + "10m": Resolution(["pixel", "gridline"], False), + "06m": Resolution(["pixel", "gridline"], False), + "05m": Resolution(["pixel", "gridline"], True), + "04m": Resolution(["pixel", "gridline"], True), + "03m": Resolution(["pixel", "gridline"], True), + "02m": Resolution(["pixel", "gridline"], True), + }, + ), } From 666e1b71988765dbfa9c1e99d3b9fa212b2808d4 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 09:45:48 -0500 Subject: [PATCH 06/14] update test --- pygmt/tests/test_datasets_earth_magnetic_anomaly.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py index 7ede743729b..503e9819ce1 100644 --- a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py +++ b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py @@ -33,7 +33,9 @@ def test_earth_mag_01d(): """ data = load_earth_magnetic_anomaly(resolution="01d", registration="gridline") assert data.name == "magnetic_anomaly" - assert data.attrs["long_name"] == "anomaly (nT)" + assert data.attrs["long_name"] == "Earth magnetic anomaly" + assert data.attrs["units"] == "nT" + assert data.attrs["horizontal_datum"] == "WGS84" assert data.shape == (181, 361) npt.assert_allclose(data.lat, np.arange(-90, 91, 1)) npt.assert_allclose(data.lon, np.arange(-180, 181, 1)) From d29791063acd04d05a863f790c5f579f94c8cca0 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 18:54:41 -0500 Subject: [PATCH 07/14] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/datasets/earth_magnetic_anomaly.py | 4 ---- pygmt/datasets/load_remote_dataset.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index 7816a93854c..6d4c444f76d 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -58,12 +58,8 @@ def load_earth_magnetic_anomaly(resolution="01d", region=None, registration=None Earth magnetic anomaly with resolutions of 5 arc-minutes or higher, which are stored as smaller tiles. """ - - # Choose earth magnetic anomaly data prefix dataset_prefix = "earth_mag_" - dataset_name = "earth_magnetic_anomaly" - grid = _load_remote_dataset( dataset_name=dataset_name, dataset_prefix=dataset_prefix, diff --git a/pygmt/datasets/load_remote_dataset.py b/pygmt/datasets/load_remote_dataset.py index c31e85daff5..309bc324542 100644 --- a/pygmt/datasets/load_remote_dataset.py +++ b/pygmt/datasets/load_remote_dataset.py @@ -124,7 +124,7 @@ class GMTRemoteDataset(NamedTuple): "05m": Resolution(["pixel", "gridline"], True), "04m": Resolution(["pixel", "gridline"], True), "03m": Resolution(["pixel", "gridline"], True), - "02m": Resolution(["pixel", "gridline"], True), + "02m": Resolution(["pixel"], True), }, ), } From 078c1755352bbd32f5d29eacf8113daa77c38586 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 7 Dec 2022 07:38:02 -0500 Subject: [PATCH 08/14] move dataset_name to pass the string directly to _load_remote_dataset() --- pygmt/datasets/earth_magnetic_anomaly.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index 6d4c444f76d..117682f5f32 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -59,9 +59,8 @@ def load_earth_magnetic_anomaly(resolution="01d", region=None, registration=None which are stored as smaller tiles. """ dataset_prefix = "earth_mag_" - dataset_name = "earth_magnetic_anomaly" grid = _load_remote_dataset( - dataset_name=dataset_name, + dataset_name="earth_magnetic_anomaly", dataset_prefix=dataset_prefix, resolution=resolution, region=region, From 3e8fe66357adc9bb7aa64acf2325896b2a1c8dfa Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 7 Dec 2022 09:19:32 -0500 Subject: [PATCH 09/14] change test title to match loaded resolution --- pygmt/tests/test_datasets_earth_magnetic_anomaly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py index 503e9819ce1..6002c630bc7 100644 --- a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py +++ b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py @@ -57,7 +57,7 @@ def test_earth_mag_01d_with_region(): npt.assert_allclose(data.max(), 127.39996) -def test_earth_mag_04m_with_region(): +def test_earth_mag_03m_with_region(): """ Test loading a subregion of high-resolution earth magnetic anomaly data. """ From 952d34c4612b2732c2312ab2c24624ff73f4c8dd Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 7 Dec 2022 14:30:46 -0500 Subject: [PATCH 10/14] update test to use 05m resolution --- .../test_datasets_earth_magnetic_anomaly.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py index 6002c630bc7..8a2d35567d3 100644 --- a/pygmt/tests/test_datasets_earth_magnetic_anomaly.py +++ b/pygmt/tests/test_datasets_earth_magnetic_anomaly.py @@ -57,18 +57,20 @@ def test_earth_mag_01d_with_region(): npt.assert_allclose(data.max(), 127.39996) -def test_earth_mag_03m_with_region(): +def test_earth_mag_05m_with_region(): """ Test loading a subregion of high-resolution earth magnetic anomaly data. """ data = load_earth_magnetic_anomaly( - resolution="03m", region=[-115, -112, 4, 6], registration="gridline" + resolution="05m", region=[-115, -112, 4, 6], registration="gridline" ) - assert data.shape == (41, 61) - npt.assert_allclose(data.lat, np.arange(4, 6.01, 0.05)) - npt.assert_allclose(data.lon, np.arange(-115, -111.99, 0.05)) - npt.assert_allclose(data.data.min(), -193) - npt.assert_allclose(data.data.max(), 110) + assert data.shape == (25, 37) + assert data.lat.min() == 4 + assert data.lat.max() == 6 + assert data.lon.min() == -115 + assert data.lon.max() == -112 + npt.assert_allclose(data.min(), -189.20001) + npt.assert_allclose(data.max(), 107) def test_earth_mag_05m_without_region(): From 0e1417b1802e0b8352c93407e37054a2357071e4 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 7 Dec 2022 14:30:59 -0500 Subject: [PATCH 11/14] add cache files to testing.py --- pygmt/helpers/testing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pygmt/helpers/testing.py b/pygmt/helpers/testing.py index 57c916f5f83..29d1e5f1f8b 100644 --- a/pygmt/helpers/testing.py +++ b/pygmt/helpers/testing.py @@ -180,6 +180,9 @@ def download_test_data(): # Earth seafloor age grids "@earth_age_01d_g", "@S90W180.earth_age_05m_g.nc", # Specific grid for 05m test + # Earth magnetic anomaly grids + "@earth_mag_01d_g.grd" + "@S90W180.earth_mag_05m_g.nc" # Specific grid for 05m test # Other cache files "@capitals.gmt", "@earth_relief_20m_holes.grd", From f8f6b41c638ad86ee70d0b0716a76bd115c79c89 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 7 Dec 2022 14:31:42 -0500 Subject: [PATCH 12/14] uncomment "pull request" --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index b2258b1ed29..35275a3a1b2 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - # pull_request: + pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' From 4e0e2aef7bc9d22b3ff44a8957817eafda20571a Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 7 Dec 2022 14:32:08 -0500 Subject: [PATCH 13/14] recomment "pull request" --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 35275a3a1b2..b2258b1ed29 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - pull_request: + # pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' From 4edfb7b81b0d84de251388401fde271b0dbed850 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Thu, 8 Dec 2022 07:14:56 -0500 Subject: [PATCH 14/14] Update .github/workflows/cache_data.yaml Co-authored-by: Dongdong Tian --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 35275a3a1b2..b2258b1ed29 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - pull_request: + # pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0'