From f7d0b948192ce879c4ebbfb4e92c5e0512f077e3 Mon Sep 17 00:00:00 2001 From: Srija Chakraborty Date: Tue, 17 Aug 2021 18:38:39 -0400 Subject: [PATCH 1/4] adding dummy test file --- test_file.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test_file.txt diff --git a/test_file.txt b/test_file.txt new file mode 100644 index 00000000000..977d4b84073 --- /dev/null +++ b/test_file.txt @@ -0,0 +1 @@ +added test text From e55805b22b45e37207c8d1cac3f8197270d44b51 Mon Sep 17 00:00:00 2001 From: Srija Chakraborty Date: Thu, 19 Aug 2021 18:45:11 -0400 Subject: [PATCH 2/4] Initial load earth night function --- pygmt/datasets/earth_relief.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index 9c248989f57..004ebbe08f2 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -9,6 +9,9 @@ from pygmt.helpers import kwargs_to_strings from pygmt.src import grdcut, which +def load_earth_night(): + pass + @kwargs_to_strings(region="sequence") def load_earth_relief(resolution="01d", region=None, registration=None, use_srtm=False): From 79e3edfe15b3e19f1eadf209fa949cf9e99e5025 Mon Sep 17 00:00:00 2001 From: Srija Chakraborty Date: Thu, 19 Aug 2021 19:09:51 -0400 Subject: [PATCH 3/4] Load earth_night_01d --- pygmt/datasets/earth_relief.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index 004ebbe08f2..c90d9c5b4b0 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -8,9 +8,12 @@ from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import kwargs_to_strings from pygmt.src import grdcut, which +import rioaxarray def load_earth_night(): - pass + fname = which("@earth_night_01d") + dataarray=xr.open_dataarray(fname, engine="rasterio") + return dataarray @kwargs_to_strings(region="sequence") From ca8a74251b30bdc0891629d4d3ddd8d1f98dfe1a Mon Sep 17 00:00:00 2001 From: srijac <50964856+srijac@users.noreply.github.com> Date: Thu, 19 Aug 2021 19:22:59 -0400 Subject: [PATCH 4/4] Delete test_file.txt --- test_file.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test_file.txt diff --git a/test_file.txt b/test_file.txt deleted file mode 100644 index 977d4b84073..00000000000 --- a/test_file.txt +++ /dev/null @@ -1 +0,0 @@ -added test text