Skip to content

Commit a28d8d2

Browse files
committed
Merge branch 'MPAS-Dev/MPAS-Analysis/develop'
2 parents 67a19c0 + 11205a9 commit a28d8d2

File tree

25 files changed

+78
-76
lines changed

25 files changed

+78
-76
lines changed

ci/recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "MPAS-Analysis" %}
2-
{% set version = "1.7.0" %}
2+
{% set version = "1.7.1" %}
33

44
package:
55
name: {{ name|lower }}

docs/versions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Documentation On GitHub
1616
`v1.6.0`_ `1.6.0`_
1717
`v1.6.1`_ `1.6.1`_
1818
`v1.7.0`_ `1.7.0`_
19+
`v1.7.1`_ `1.7.1`_
1920
================ ===============
2021

2122
.. _`stable`: ../stable/index.html
@@ -30,6 +31,7 @@ Documentation On GitHub
3031
.. _`v1.6.0`: ../1.6.0/index.html
3132
.. _`v1.6.1`: ../1.6.1/index.html
3233
.. _`v1.7.0`: ../1.7.0/index.html
34+
.. _`v1.7.1`: ../1.7.1/index.html
3335
.. _`master`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/master
3436
.. _`develop`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/develop
3537
.. _`1.2.6`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.2.6
@@ -42,3 +44,4 @@ Documentation On GitHub
4244
.. _`1.6.0`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.6.0
4345
.. _`1.6.1`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.6.1
4446
.. _`1.7.0`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.7.0
47+
.. _`1.7.1`: https://github.com/MPAS-Dev/MPAS-Analysis/tree/1.7.1

mpas_analysis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
import matplotlib as mpl
44
mpl.use('Agg')
55

6-
__version_info__ = (1, 7, 0)
6+
__version_info__ = (1, 7, 1)
77
__version__ = '.'.join(str(vi) for vi in __version_info__)

mpas_analysis/ocean/index_nino34.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def _compute_nino34_index(self, regionSST, calendar):
328328
regionSST : xarray.DataArray object
329329
values of SST in the nino region
330330
331-
calendar: {'gregorian', 'gregorian_noleap'}
331+
calendar: {'gregorian', 'noleap'}
332332
The name of the calendars used in the MPAS run
333333
334334
Returns

mpas_analysis/ocean/regional_ts_diagrams.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, config, mpasClimatologyTask, regionMasksTask,
7777
regionMasksTask : ``ComputeRegionMasks``
7878
A task for computing region masks
7979
80-
controlconfig : mpas_tools.config.MpasConfigParser, optional
80+
controlConfig : mpas_tools.config.MpasConfigParser, optional
8181
Configuration options for a control run (if any)
8282
"""
8383
# Authors
@@ -658,12 +658,9 @@ def _write_mpas_t_s(self, config):
658658

659659
ds = ds.where(cellMask, drop=True)
660660

661-
self.logger.info("Don't worry about the following dask "
662-
"warnings.")
663661
depthMask = numpy.logical_and(ds.zMid >= zmin,
664662
ds.zMid <= zmax)
665663
depthMask.compute()
666-
self.logger.info("Dask warnings should be done.")
667664
ds['depthMask'] = depthMask
668665

669666
for var in variableList:
@@ -715,7 +712,7 @@ def _write_obs_t_s(self, obsDict, zmin, zmax):
715712
xarray.open_dataset(regionMaskFileName).chunk(chunk).stack(
716713
nCells=(obsDict['latVar'], obsDict['lonVar']))
717714
dsRegionMask = dsRegionMask.reset_index('nCells').drop_vars(
718-
[obsDict['latVar'], obsDict['lonVar']])
715+
[obsDict['latVar'], obsDict['lonVar'], 'nCells'])
719716

720717
maskRegionNames = decode_strings(dsRegionMask.regionNames)
721718
regionIndex = maskRegionNames.index(self.regionName)
@@ -745,7 +742,7 @@ def _write_obs_t_s(self, obsDict, zmin, zmax):
745742
ds = xarray.open_dataset(obsFileName, chunks=chunk)
746743
ds = ds.stack(nCells=(obsDict['latVar'], obsDict['lonVar']))
747744
ds = ds.reset_index('nCells').drop_vars(
748-
[obsDict['latVar'], obsDict['lonVar']])
745+
[obsDict['latVar'], obsDict['lonVar'], 'nCells'])
749746

750747
ds = ds.where(cellMask, drop=True)
751748

mpas_analysis/ocean/time_series_ocean_regions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ def run_task(self):
871871
xarray.open_dataset(regionMaskFileName).stack(
872872
nCells=(obsDict['latVar'], obsDict['lonVar']))
873873
dsRegionMask = dsRegionMask.reset_index('nCells').drop_vars(
874-
[obsDict['latVar'], obsDict['lonVar']])
874+
[obsDict['latVar'], obsDict['lonVar'], 'nCells'])
875875

876876
maskRegionNames = decode_strings(dsRegionMask.regionNames)
877877
regionIndex = maskRegionNames.index(self.regionName)
@@ -956,7 +956,7 @@ def run_task(self):
956956
dsMonth = dsMonth.stack(nCells=(obsDict['latVar'],
957957
obsDict['lonVar']))
958958
dsMonth = dsMonth.reset_index('nCells').drop_vars(
959-
[obsDict['latVar'], obsDict['lonVar']])
959+
[obsDict['latVar'], obsDict['lonVar'], 'nCells'])
960960

961961
dsMonth = dsMonth.where(cellMask, drop=True)
962962

mpas_analysis/sea_ice/time_series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def _replicate_cycle(self, ds, dsToReplicate, calendar):
525525
length of dsToReplicate plus the time between the first two time
526526
values (typically one year total).
527527
528-
calendar : {'gregorian', 'gregorian_noleap'}
528+
calendar : {'gregorian', 'noleap'}
529529
The name of one of the calendars supported by MPAS cores
530530
531531
Returns:

mpas_analysis/shared/climatology/climatology.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def compute_monthly_climatology(ds, calendar=None, maskVaries=True):
147147
A data set with a ``Time`` coordinate expressed as days since
148148
0001-01-01 or ``month`` coordinate
149149
150-
calendar : {'gregorian', 'gregorian_noleap'}, optional
150+
calendar : {'gregorian', 'noleap'}, optional
151151
The name of one of the calendars supported by MPAS cores, used to
152152
determine ``month`` from ``Time`` coordinate, so must be supplied if
153153
``ds`` does not already have a ``month`` coordinate or data array
@@ -201,7 +201,7 @@ def compute_climatology(ds, monthValues, calendar=None,
201201
monthValues : int or array-like of ints
202202
A single month or an array of months to be averaged together
203203
204-
calendar : {'gregorian', 'gregorian_noleap'}, optional
204+
calendar : {'gregorian', 'noleap'}, optional
205205
The name of one of the calendars supported by MPAS cores, used to
206206
determine ``month`` from ``Time`` coordinate, so must be supplied if
207207
``ds`` does not already have a ``month`` coordinate or data array
@@ -242,7 +242,7 @@ def add_years_months_days_in_month(ds, calendar=None):
242242
"""
243243
Add ``year``, ``month`` and ``daysInMonth`` as data arrays in ``ds``.
244244
The number of days in each month of ``ds`` is computed either using the
245-
``startTime`` and ``endTime`` if available or assuming ``gregorian_noleap``
245+
``startTime`` and ``endTime`` if available or assuming ``noleap``
246246
calendar and ignoring leap years. ``year`` and ``month`` are computed
247247
accounting correctly for the the calendar.
248248
@@ -252,7 +252,7 @@ def add_years_months_days_in_month(ds, calendar=None):
252252
A data set with a ``Time`` coordinate expressed as days since
253253
0001-01-01
254254
255-
calendar : {'gregorian', 'gregorian_noleap'}, optional
255+
calendar : {'gregorian', 'noleap'}, optional
256256
The name of one of the calendars supported by MPAS cores, used to
257257
determine ``year`` and ``month`` from ``Time`` coordinate
258258

mpas_analysis/shared/climatology/ref_year_mpas_climatology_task.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ def get_start_and_end(self):
100100
startDate = '{:04d}-01-01_00:00:00'.format(startYear)
101101
endDate = '{:04d}-12-31_23:59:59'.format(endYear)
102102

103-
config.set('climatology', 'startYear', str(startYear))
104-
config.set('climatology', 'startDate', startDate)
105-
config.set('climatology', 'endYear', str(endYear))
106-
config.set('climatology', 'endDate', endDate)
103+
# using "user=True" so these changes take priority over user config
104+
# options
105+
config.set('climatology', 'startYear', str(startYear), user=True)
106+
config.set('climatology', 'startDate', startDate, user=True)
107+
config.set('climatology', 'endYear', str(endYear), user=True)
108+
config.set('climatology', 'endDate', endDate, user=True)
107109

108110
return startYear, endYear
109111

mpas_analysis/shared/generalized_reader/generalized_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def open_multifile_dataset(fileNames, calendar, config,
4747
fileNames : list of strings
4848
A lsit of file paths to read
4949
50-
calendar : {``'gregorian'``, ``'gregorian_noleap'``}, optional
50+
calendar : {``'gregorian'``, ``'noleap'``}, optional
5151
The name of one of the calendars supported by MPAS cores
5252
5353
config : mpas_tools.config.MpasConfigParser
@@ -186,7 +186,7 @@ def _preprocess(ds, calendar, simulationStartTime, timeVariableName,
186186
an xarray time coordinate and with variable names to be
187187
substituted.
188188
189-
calendar : {'gregorian', 'gregorian_noleap'}
189+
calendar : {'gregorian', 'noleap'}
190190
The name of one of the calendars supported by MPAS cores
191191
192192
The name of the time variable (typically 'Time' if using a variableMap

0 commit comments

Comments
 (0)