@@ -78,6 +78,25 @@ class GMTRemoteDataset(NamedTuple):
78
78
"01m" : Resolution ("01m" , registrations = ["gridline" ], tiled = True ),
79
79
},
80
80
),
81
+ "earth_day" : GMTRemoteDataset (
82
+ description = "NASA Day Images" ,
83
+ units = None ,
84
+ extra_attributes = {"long_name" : "blue_marble" , "horizontal_datum" : "WGS84" },
85
+ resolutions = {
86
+ "01d" : Resolution ("01d" , registrations = ["pixel" ]),
87
+ "30m" : Resolution ("30m" , registrations = ["pixel" ]),
88
+ "20m" : Resolution ("20m" , registrations = ["pixel" ]),
89
+ "15m" : Resolution ("15m" , registrations = ["pixel" ]),
90
+ "10m" : Resolution ("10m" , registrations = ["pixel" ]),
91
+ "06m" : Resolution ("06m" , registrations = ["pixel" ]),
92
+ "05m" : Resolution ("05m" , registrations = ["pixel" ]),
93
+ "04m" : Resolution ("04m" , registrations = ["pixel" ]),
94
+ "03m" : Resolution ("03m" , registrations = ["pixel" ]),
95
+ "02m" : Resolution ("02m" , registrations = ["pixel" ]),
96
+ "01m" : Resolution ("01m" , registrations = ["pixel" ]),
97
+ "30s" : Resolution ("30s" , registrations = ["pixel" ]),
98
+ },
99
+ ),
81
100
"earth_faa" : GMTRemoteDataset (
82
101
description = "IGPP Earth free-air anomaly" ,
83
102
units = "mGal" ,
@@ -409,15 +428,18 @@ def _load_remote_dataset(
409
428
f"'region' is required for { dataset .description } resolution '{ resolution } '."
410
429
)
411
430
412
- # Currently, only grids are supported. Will support images in the future.
413
- kwdict = {"T" : "g" , "R" : region } # region can be None
431
+ kind = "image" if name in {"earth_day" } else "grid"
432
+ kwdict = {
433
+ "R" : region , # region can be None
434
+ "T" : "i" if kind == "image" else "g" ,
435
+ }
414
436
with Session () as lib :
415
- with lib .virtualfile_out (kind = "grid" ) as voutgrd :
437
+ with lib .virtualfile_out (kind = kind ) as voutgrd :
416
438
lib .call_module (
417
439
module = "read" ,
418
440
args = [fname , voutgrd , * build_arg_list (kwdict )],
419
441
)
420
- grid = lib .virtualfile_to_raster (outgrid = None , vfname = voutgrd )
442
+ grid = lib .virtualfile_to_raster (kind = kind , outgrid = None , vfname = voutgrd )
421
443
422
444
# Full path to the grid if not tiled grids.
423
445
source = which (fname , download = "a" ) if not resinfo .tiled else None
0 commit comments