|
15 | 15 | from numpy import bincount, bytes_, empty, in1d, unique |
16 | 16 | from yaml import safe_load |
17 | 17 |
|
18 | | -from .. import TIME_MODELS, EddyParser |
| 18 | +from .. import EddyParser, identify_time |
19 | 19 | from ..observations.observation import EddiesObservations, reverse_index |
20 | 20 | from ..observations.tracking import TrackEddiesObservations |
21 | 21 | from ..tracking import Correspondances |
@@ -163,7 +163,12 @@ def eddies_tracking(): |
163 | 163 | parser.add_argument( |
164 | 164 | "--zarr", action="store_true", help="Output will be wrote in zarr" |
165 | 165 | ) |
166 | | - parser.add_argument("--unraw", action="store_true", help="Load unraw data") |
| 166 | + parser.add_argument( |
| 167 | + "--unraw", |
| 168 | + action="store_true", |
| 169 | + help="Load unraw data, use only for netcdf." |
| 170 | + "If unraw is active, netcdf is loaded without apply scalefactor and add_offset.", |
| 171 | + ) |
167 | 172 | parser.add_argument( |
168 | 173 | "--blank_period", |
169 | 174 | type=int, |
@@ -265,16 +270,7 @@ def browse_dataset_in( |
265 | 270 |
|
266 | 271 | if str_date is not None: |
267 | 272 | if date_model is None: |
268 | | - model_found = False |
269 | | - for model in TIME_MODELS: |
270 | | - try: |
271 | | - item["date"] = datetime.strptime(str_date, model) |
272 | | - model_found = True |
273 | | - break |
274 | | - except ValueError: |
275 | | - pass |
276 | | - if not model_found: |
277 | | - raise Exception("No time model found") |
| 273 | + item["date"] = identify_time(str_date) |
278 | 274 | else: |
279 | 275 | item["date"] = datetime.strptime(str_date, date_model) |
280 | 276 |
|
|
0 commit comments