You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same as above. In theory, the use of days since 0001-01-01 would allow any year
107
107
to be supported, not just the range from 0001 to 9999. However, the conversions
108
108
to `datetime.datetime` objects for mathematical manipulation will constrain
109
-
the dates to be between datetime.min (0001-01-01) and datetime.max (9999-12-31).
109
+
the dates to be between `datetime.min` (0001-01-01) and `datetime.max` (9999-12-31).
110
110
111
111
112
112
<h1> Design and Implementation </h1>
113
113
114
114
<h2> Implementation: The 'Time' coordinate of xarray data sets must be consistent
115
115
with the MPAS calendar <br>
116
-
Date last modified: 2017/02/11 <br>
116
+
Date last modified: 2017/02/16 <br>
117
117
Contributors: Xylar Asay-Davis
118
118
</h2>
119
119
@@ -131,18 +131,19 @@ from ..timekeeping.utility import string_to_days_since_date, \
131
131
days_to_datetime, datetime_to_days
132
132
```
133
133
**This violates the first requirement in the
134
-
[MpasXarray class design doc](https://github.com/xylar/MPAS-Analysis/blob/design_doc_variable_mapping_reorg/design_docs/mpas_xarray_class.md).
134
+
[Design Document: Moving variable mapping out of mpas_xarray](https://github.com/xylar/MPAS-Analysis/blob/design_doc_variable_mapping_reorg/design_docs/variable_mapping_reorg.md).
135
135
I am open to alternative solutions for keeping `mpas_xarray` separate from the rest
136
136
of analysis but these 3 functions do not conceptually belong in `mpas_xarray`. The
137
137
problem is exacerbated by the fact that there are analysis-specific functions in
138
138
`timekeeping`, meaning that this cannot easily be made a submodule of `mpas_xarray`
139
139
(nor would this make very much logical sense). Having 2 `timekeeping` modules, one
140
140
for `mpas_xarray` and one for MPAS-Analysis, seems unnecessarily confunsing.**
141
141
142
-
The methods and helper functions named `open_multifile_dataset` haave been updated
143
-
to use this method for parsing times. This involves removing the `year_offset` argument
144
-
and adding an optional `simulation_start_time` argument for supplying a date to use to
145
-
convert variables like `daysSinceStartOfSim` to days since 0001-01-01.
142
+
The functions `generalized_reader.open_multifile_dataset` and
143
+
`mpas_xarray.open_multifile_dataset` have been updated to use this method for parsing
144
+
times. This involves removing the `year_offset` argument and adding an optional
145
+
`simulation_start_time` argument for supplying a date to use to convert variables
146
+
like `daysSinceStartOfSim` to days since 0001-01-01.
146
147
147
148
An example of opening a data set and manipulating times withe the new approach in
148
149
the OHC script is:
@@ -279,16 +280,13 @@ Date last modified: 2017/02/11 <br>
279
280
Contributors: Xylar Asay-Davis
280
281
</h2>
281
282
In [xylar/generalize_calendar](https://github.com/xylar/MPAS-Analysis/tree/generalize_calendar),
282
-
unit testing has been added for timekeeping and mpas_xarray and MpasAnsalysisXarray that checks
283
-
both the `gregorian` and `gregorian_noleap` calendars under simple test conditions. However, we
284
-
have no data sets that test `gregorian`, so we have a somewhat limited ability to test this
285
-
calendar option. Fortunately, there are also no immediate plans to run with `gregorian`.
286
-
287
-
I have tested that the results (except `regriddedSeaIceConcThick`, which I'm not able to run on my
288
-
laptop) of a G240km ACME test case are bit-for-bit identical to those from `develop`.
283
+
unit testing has been added for `timekeeping` and `mpas_xarray` that checks both the `gregorian`
284
+
and `gregorian_noleap` calendars under simple test conditions. However, we have no data sets
285
+
that test `gregorian`, so we have a somewhat limited ability to test this calendar option.
286
+
Fortunately, there are also no immediate plans to run with `gregorian`.
289
287
290
-
I will make sure all tests with config files in the configs/lanl directory produce bit-for-bit
291
-
results with the current develop.
288
+
I will make sure all tests with config files in the `configs/lanl` and `configs/edison`
289
+
directories produce bit-for-bit results with the current `develop`.
292
290
293
291
<h2> Testing and Validation: The 'Time' coordinate of xarray data sets must support at least years
294
292
0001 and 9999, and preferably any conceivable value<br>
@@ -300,5 +298,6 @@ Unit tests have been added to ensure that dates both close to 0001-01-01 and typ
300
298
calendar dates (e.g. 2017-01-01) function as expected.
301
299
302
300
@akturner's MPAS-SeaIce run with real dates (mentioned in
303
-
[#81](https://github.com/MPAS-Dev/MPAS-Analysis/issues/81)) will also be analyzed to make sure
304
-
we are supporting a range of years starting in 1958.
301
+
[#81](https://github.com/MPAS-Dev/MPAS-Analysis/issues/81)) has been successfully
302
+
run with the proposed approach. This run started in 1958, and had presented a problem
0 commit comments