Skip to content

Commit 97e1c1d

Browse files
authored
Merge pull request #1152 from erinethomas/wave_mods
mods needed for wave- climatology (frequency)
2 parents 8afa9ea + 47a33cc commit 97e1c1d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

mpas_analysis/ocean/climatology_map_waves.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
unicode_literals
1313

1414
import xarray as xr
15+
import numpy as np
1516
from pyremap import LatLonGridDescriptor
1617

1718
from mpas_analysis.shared import AnalysisTask
@@ -287,6 +288,7 @@ def customize_masked_climatology(self, climatology, season): # {{{
287288
if 'timeMonthly_avg_peakWaveFrequency' in climatology:
288289
climatology['peakWavePeriod'] = \
289290
1.0/climatology['timeMonthly_avg_peakWaveFrequency']
291+
climatology['peakWavePeriod'].values = np.nan_to_num(climatology['peakWavePeriod'].values, nan=-9999.0, posinf=-9999.0, neginf=-9999.0)
290292

291293
if 'timeMonthly_avg_significantWaveHeight' in climatology:
292294
climatology['significantWaveHeight'] = \

0 commit comments

Comments
 (0)