From 8a4544393ae805968db4a36b35bef7940a7cdef0 Mon Sep 17 00:00:00 2001 From: Craig Hartsough Date: Sun, 7 Jul 2024 01:35:47 +0000 Subject: [PATCH] initial changes to plot HFIP products. --- adb_graphics/datahandler/gribdata.py | 2 +- adb_graphics/figures/maps.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/adb_graphics/datahandler/gribdata.py b/adb_graphics/datahandler/gribdata.py index a0e9e55..6bf6560 100644 --- a/adb_graphics/datahandler/gribdata.py +++ b/adb_graphics/datahandler/gribdata.py @@ -551,7 +551,7 @@ def corners(self) -> list: ''' lat, lon = self.latlons() - if self.model in ['global', 'obs']: + if self.model in ['global', 'hfip', 'obs']: ret = [lat[-1], lat[0], lon[0], lon[-1]] else: ret = [lat[0, 0], lat[-1, -1], lon[0, 0], lon[-1, -1]] diff --git a/adb_graphics/figures/maps.py b/adb_graphics/figures/maps.py index 3e29014..a741963 100644 --- a/adb_graphics/figures/maps.py +++ b/adb_graphics/figures/maps.py @@ -59,6 +59,7 @@ 'GreatLakes': {'corners': [37, 50, -96, -70], 'stride': 10, 'length': 4}, 'HI': {'corners': [16.6, 24.6, -157.6, -157.5], 'stride': 1, 'length': 4}, 'HI-zoom': {'corners': None, 'width': 800000, 'height': 800000, 'stride': 4, 'length': 4}, + 'HFIP': {'corners': [8.35, 51.6, 244., 336.], 'stride': 30, 'length': 4}, 'Hurr-Car': {'corners': [21, 28, -96, -69], 'stride': 10, 'length': 4}, 'Juneau': {'corners': [55.741, 59.629, -140.247, -129.274], 'stride': 4, 'length': 4}, 'NW-large': {'corners': [29.5787, 52.6127, -121.666, -96.5617], 'stride': 15, 'length': 4}, @@ -158,7 +159,7 @@ def boundaries(self): zorder=2, ) else: - if self.model not in ['global'] and self.tile not in FULL_TILES: + if self.model not in ['global', 'hfip'] and self.tile not in FULL_TILES: self.m.drawcounties(antialiased=False, color='gray', linewidth=0.1, @@ -488,7 +489,7 @@ def _draw_field(self, ax, field, func, **kwargs): # For global lat-lon models, make 2D arrays for x and y # Shift the map and data if needed - if self.map.model in ['global']: + if self.map.model in ['global', 'hfip']: tile = self.map.tile if tile in ['Africa', 'Europe']: vals, x = shiftgrid(180., vals, x, start=False)