From 47a33cc7cff32bce6fabc7e8bdc4966fba442524 Mon Sep 17 00:00:00 2001 From: Erin Thomas Date: Mon, 29 Jun 2026 08:40:08 -0700 Subject: [PATCH] mods needed for wave- climatology (frequency) --- mpas_analysis/ocean/climatology_map_waves.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mpas_analysis/ocean/climatology_map_waves.py b/mpas_analysis/ocean/climatology_map_waves.py index 0f31c6fb2..955a6cf2d 100644 --- a/mpas_analysis/ocean/climatology_map_waves.py +++ b/mpas_analysis/ocean/climatology_map_waves.py @@ -12,6 +12,7 @@ unicode_literals import xarray as xr +import numpy as np from pyremap import LatLonGridDescriptor from mpas_analysis.shared import AnalysisTask @@ -287,6 +288,7 @@ def customize_masked_climatology(self, climatology, season): # {{{ if 'timeMonthly_avg_peakWaveFrequency' in climatology: climatology['peakWavePeriod'] = \ 1.0/climatology['timeMonthly_avg_peakWaveFrequency'] + climatology['peakWavePeriod'].values = np.nan_to_num(climatology['peakWavePeriod'].values, nan=-9999.0, posinf=-9999.0, neginf=-9999.0) if 'timeMonthly_avg_significantWaveHeight' in climatology: climatology['significantWaveHeight'] = \