diff --git a/mpas_analysis/default.cfg b/mpas_analysis/default.cfg index 5a016f2c7..429ae8693 100755 --- a/mpas_analysis/default.cfg +++ b/mpas_analysis/default.cfg @@ -331,6 +331,10 @@ fitColor1 = tab:blue # land_ice_mass_flux_components : Mass fluxes from land ice plotTypes = ['absolute_energy_error', 'absolute_salt_error', 'total_mass_change'] +# Number of points over which to compute moving average(e.g., for monthly +# output, movingAveragePoints=12 corresponds to a 12-month moving average +# window) +movingAveragePoints = 365 [index] ## options related to producing nino index. diff --git a/mpas_analysis/ocean/conservation.py b/mpas_analysis/ocean/conservation.py index 3ed92b483..9d224d6d8 100644 --- a/mpas_analysis/ocean/conservation.py +++ b/mpas_analysis/ocean/conservation.py @@ -468,9 +468,11 @@ def _make_plot(self, plot_type): lineStyles.append(lineStylesBase[index]) lineWidths = [3 for i in fields] - if config.has_option('timeSeries', 'movingAveragePoints'): - movingAveragePoints = config.getint('timeSeries', - 'movingAveragePoints') + if config.has_option('timeSeriesConservation', 'movingAveragePoints'): + # We assume here that movingAveragePoints is given in months + # and conservation output has daily frequency + movingAveragePoints = \ + config.getint('timeSeriesConservation', 'movingAveragePoints') else: movingAveragePoints = None diff --git a/mpas_analysis/shared/io/mpas_reader.py b/mpas_analysis/shared/io/mpas_reader.py index 9f866df76..6d1d8c99a 100644 --- a/mpas_analysis/shared/io/mpas_reader.py +++ b/mpas_analysis/shared/io/mpas_reader.py @@ -195,7 +195,8 @@ def _parse_dataset_time(ds, inTimeVariableName, calendar, timeStrings = [''.join(xtime.astype('U')).strip() for xtime in timeVar.values] for i, timeString in enumerate(timeStrings): - if timeString[8:] == '15_00:00:00' and i +1 < len(timeStrings): + if timeString == '0000-01-15_00:00:00' and \ + i + 1 < len(timeStrings): timeStrings[i] = f'{timeStrings[i + 1][:7]}-01_00:00:00' days = string_to_days_since_date(dateString=timeStrings, referenceDate=referenceDate, diff --git a/suite/setup.py b/suite/setup.py index a847c159e..da097109d 100755 --- a/suite/setup.py +++ b/suite/setup.py @@ -54,7 +54,7 @@ def main(): simulation = '20200305.A_WCYCL1850.ne4_oQU480.anvil' mesh = 'QU480' else: - simulation = '20230406.GMPAS-IAF-ISMF.T62_oQU240wLI.chrysalis' + simulation = '20240718.GMPAS-IAF-PISMF.T62_oQU240wLI.chrysalis' mesh = 'oQU240wLI' if machine in ['anvil', 'chrysalis']: input_base = '/lcrc/group/e3sm/public_html/diagnostics/mpas_analysis/example_simulations'