From 0d64c7f252a9a62780ca6bf7c22c2220c4662150 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 26 Dec 2022 12:18:42 +0800 Subject: [PATCH 1/2] Update the order of grid registrations --- pygmt/datasets/load_remote_dataset.py | 122 +++++++++++++------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/pygmt/datasets/load_remote_dataset.py b/pygmt/datasets/load_remote_dataset.py index 915f31b15bd..42f5f6764f6 100644 --- a/pygmt/datasets/load_remote_dataset.py +++ b/pygmt/datasets/load_remote_dataset.py @@ -71,18 +71,18 @@ class GMTRemoteDataset(NamedTuple): units="meters", extra_attributes={"vertical_datum": "EGM96", "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), - "01m": Resolution(["pixel", "gridline"], True), - "30s": Resolution(["pixel", "gridline"], True), + "01d": Resolution(["gridline", "pixel"], False), + "30m": Resolution(["gridline", "pixel"], False), + "20m": Resolution(["gridline", "pixel"], False), + "15m": Resolution(["gridline", "pixel"], False), + "10m": Resolution(["gridline", "pixel"], False), + "06m": Resolution(["gridline", "pixel"], False), + "05m": Resolution(["gridline", "pixel"], True), + "04m": Resolution(["gridline", "pixel"], True), + "03m": Resolution(["gridline", "pixel"], True), + "02m": Resolution(["gridline", "pixel"], True), + "01m": Resolution(["gridline", "pixel"], True), + "30s": Resolution(["gridline", "pixel"], True), "15s": Resolution(["pixel"], True), "03s": Resolution(["gridline"], True), "01s": Resolution(["gridline"], True), @@ -95,16 +95,16 @@ class GMTRemoteDataset(NamedTuple): units="Myr", 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), + "01d": Resolution(["gridline", "pixel"], False), + "30m": Resolution(["gridline", "pixel"], False), + "20m": Resolution(["gridline", "pixel"], False), + "15m": Resolution(["gridline", "pixel"], False), + "10m": Resolution(["gridline", "pixel"], False), + "06m": Resolution(["gridline", "pixel"], False), + "05m": Resolution(["gridline", "pixel"], True), + "04m": Resolution(["gridline", "pixel"], True), + "03m": Resolution(["gridline", "pixel"], True), + "02m": Resolution(["gridline", "pixel"], True), "01m": Resolution(["gridline"], True), }, ), @@ -115,16 +115,16 @@ class GMTRemoteDataset(NamedTuple): units="m", 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), + "01d": Resolution(["gridline", "pixel"], False), + "30m": Resolution(["gridline", "pixel"], False), + "20m": Resolution(["gridline", "pixel"], False), + "15m": Resolution(["gridline", "pixel"], False), + "10m": Resolution(["gridline", "pixel"], False), + "06m": Resolution(["gridline", "pixel"], False), + "05m": Resolution(["gridline", "pixel"], True), + "04m": Resolution(["gridline", "pixel"], True), + "03m": Resolution(["gridline", "pixel"], True), + "02m": Resolution(["gridline", "pixel"], True), "01m": Resolution(["gridline"], True), }, ), @@ -135,15 +135,15 @@ class GMTRemoteDataset(NamedTuple): 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), + "01d": Resolution(["gridline", "pixel"], False), + "30m": Resolution(["gridline", "pixel"], False), + "20m": Resolution(["gridline", "pixel"], False), + "15m": Resolution(["gridline", "pixel"], False), + "10m": Resolution(["gridline", "pixel"], False), + "06m": Resolution(["gridline", "pixel"], False), + "05m": Resolution(["gridline", "pixel"], True), + "04m": Resolution(["gridline", "pixel"], True), + "03m": Resolution(["gridline", "pixel"], True), "02m": Resolution(["pixel"], True), }, ), @@ -154,16 +154,16 @@ class GMTRemoteDataset(NamedTuple): units="mGal", 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), + "01d": Resolution(["gridline", "pixel"], False), + "30m": Resolution(["gridline", "pixel"], False), + "20m": Resolution(["gridline", "pixel"], False), + "15m": Resolution(["gridline", "pixel"], False), + "10m": Resolution(["gridline", "pixel"], False), + "06m": Resolution(["gridline", "pixel"], False), + "05m": Resolution(["gridline", "pixel"], True), + "04m": Resolution(["gridline", "pixel"], True), + "03m": Resolution(["gridline", "pixel"], True), + "02m": Resolution(["gridline", "pixel"], True), "01m": Resolution(["pixel"], True), }, ), @@ -174,16 +174,16 @@ class GMTRemoteDataset(NamedTuple): units="Eotvos", 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), + "01d": Resolution(["gridline", "pixel"], False), + "30m": Resolution(["gridline", "pixel"], False), + "20m": Resolution(["gridline", "pixel"], False), + "15m": Resolution(["gridline", "pixel"], False), + "10m": Resolution(["gridline", "pixel"], False), + "06m": Resolution(["gridline", "pixel"], False), + "05m": Resolution(["gridline", "pixel"], True), + "04m": Resolution(["gridline", "pixel"], True), + "03m": Resolution(["gridline", "pixel"], True), + "02m": Resolution(["gridline", "pixel"], True), "01m": Resolution(["pixel"], True), }, ), From e2cff7d9bac2b9cec6af1cc1375047280281f5ff Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 26 Dec 2022 12:21:30 +0800 Subject: [PATCH 2/2] Sort datasets alphabetically based on dict keys --- pygmt/datasets/load_remote_dataset.py | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pygmt/datasets/load_remote_dataset.py b/pygmt/datasets/load_remote_dataset.py index 42f5f6764f6..014bd2a9baf 100644 --- a/pygmt/datasets/load_remote_dataset.py +++ b/pygmt/datasets/load_remote_dataset.py @@ -64,12 +64,12 @@ class GMTRemoteDataset(NamedTuple): datasets = { - "earth_relief": GMTRemoteDataset( - title="Earth relief", - name="elevation", - long_name="Earth elevation relative to the geoid", - units="meters", - extra_attributes={"vertical_datum": "EGM96", "horizontal_datum": "WGS84"}, + "earth_age": GMTRemoteDataset( + title="seafloor age", + name="seafloor_age", + long_name="age of seafloor crust", + units="Myr", + extra_attributes={"horizontal_datum": "WGS84"}, resolutions={ "01d": Resolution(["gridline", "pixel"], False), "30m": Resolution(["gridline", "pixel"], False), @@ -81,18 +81,14 @@ class GMTRemoteDataset(NamedTuple): "04m": Resolution(["gridline", "pixel"], True), "03m": Resolution(["gridline", "pixel"], True), "02m": Resolution(["gridline", "pixel"], True), - "01m": Resolution(["gridline", "pixel"], True), - "30s": Resolution(["gridline", "pixel"], True), - "15s": Resolution(["pixel"], True), - "03s": Resolution(["gridline"], True), - "01s": Resolution(["gridline"], True), + "01m": Resolution(["gridline"], True), }, ), - "earth_age": GMTRemoteDataset( - title="seafloor age", - name="seafloor_age", - long_name="age of seafloor crust", - units="Myr", + "earth_free_air_anomaly": GMTRemoteDataset( + title="free air anomaly", + name="free_air_anomaly", + long_name="IGPP Global Earth Free-Air Anomaly", + units="mGal", extra_attributes={"horizontal_datum": "WGS84"}, resolutions={ "01d": Resolution(["gridline", "pixel"], False), @@ -105,7 +101,7 @@ class GMTRemoteDataset(NamedTuple): "04m": Resolution(["gridline", "pixel"], True), "03m": Resolution(["gridline", "pixel"], True), "02m": Resolution(["gridline", "pixel"], True), - "01m": Resolution(["gridline"], True), + "01m": Resolution(["pixel"], True), }, ), "earth_geoid": GMTRemoteDataset( @@ -147,12 +143,12 @@ class GMTRemoteDataset(NamedTuple): "02m": Resolution(["pixel"], True), }, ), - "earth_free_air_anomaly": GMTRemoteDataset( - title="free air anomaly", - name="free_air_anomaly", - long_name="IGPP Global Earth Free-Air Anomaly", - units="mGal", - extra_attributes={"horizontal_datum": "WGS84"}, + "earth_relief": GMTRemoteDataset( + title="Earth relief", + name="elevation", + long_name="Earth elevation relative to the geoid", + units="meters", + extra_attributes={"vertical_datum": "EGM96", "horizontal_datum": "WGS84"}, resolutions={ "01d": Resolution(["gridline", "pixel"], False), "30m": Resolution(["gridline", "pixel"], False), @@ -164,7 +160,11 @@ class GMTRemoteDataset(NamedTuple): "04m": Resolution(["gridline", "pixel"], True), "03m": Resolution(["gridline", "pixel"], True), "02m": Resolution(["gridline", "pixel"], True), - "01m": Resolution(["pixel"], True), + "01m": Resolution(["gridline", "pixel"], True), + "30s": Resolution(["gridline", "pixel"], True), + "15s": Resolution(["pixel"], True), + "03s": Resolution(["gridline"], True), + "01s": Resolution(["gridline"], True), }, ), "earth_vgg": GMTRemoteDataset(