Skip to content

Commit 3a971ab

Browse files
committed
Remove errorOnMissing config option
We always want an error on missing data
1 parent 99bbe5d commit 3a971ab

5 files changed

Lines changed: 6 additions & 35 deletions

File tree

mpas_analysis/default.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ file_cache_maxsize = 1200
151151
# with a single time slice.
152152
maxChunkSize = 10000
153153

154-
# Whether missing input data should produce an error. If not, the user gets
155-
# a warning and the time bounds are adjusted to the beginning and end of the
156-
# available data
157-
errorOnMissing = False
158-
159154

160155
[output]
161156
## options related to writing out plots, intermediate cached data sets, logs,

mpas_analysis/polar_regions.cfg

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
[input]
2-
## options related to reading in the results to be analyzed
3-
4-
# Whether missing input data should produce an error. If not, the user gets
5-
# a warning and the time bounds are adjusted to the beginning and end of the
6-
# available data
7-
errorOnMissing = True
8-
91
[output]
102
## options related to writing out plots, intermediate cached data sets, logs,
113
## etc.

mpas_analysis/shared/analysis_task.py

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,6 @@ def update_time_bounds_from_file_names(config, section, componentName):
587587
'{}HistorySubdirectory'.format(componentName),
588588
defaultPath=runDirectory)
589589

590-
errorOnMissing = config.getboolean('input', 'errorOnMissing')
591-
592590
namelistFileName = build_config_full_path(
593591
config, 'input',
594592
'{}NamelistFileName'.format(componentName))
@@ -660,24 +658,12 @@ def update_time_bounds_from_file_names(config, section, componentName):
660658
requestedEndYear = endYear
661659

662660
if startYear != requestedStartYear or endYear != requestedEndYear:
663-
if errorOnMissing:
664-
raise ValueError(
665-
"{} start and/or end year different from requested\n"
666-
"requested: {:04d}-{:04d}\n"
667-
"actual: {:04d}-{:04d}\n".format(
668-
section, requestedStartYear, requestedEndYear, startYear,
669-
endYear))
670-
else:
671-
print("Warning: {} start and/or end year different from "
672-
"requested\n"
673-
"requested: {:04d}-{:04d}\n"
674-
"actual: {:04d}-{:04d}\n".format(section,
675-
requestedStartYear,
676-
requestedEndYear,
677-
startYear,
678-
endYear))
679-
config.set(section, 'startYear', str(startYear))
680-
config.set(section, 'endYear', str(endYear))
661+
raise ValueError(
662+
"{} start and/or end year different from requested\n"
663+
"requested: {:04d}-{:04d}\n"
664+
"actual: {:04d}-{:04d}\n".format(
665+
section, requestedStartYear, requestedEndYear, startYear,
666+
endYear))
681667

682668
startDate = '{:04d}-01-01_00:00:00'.format(startYear)
683669
config.set(section, 'startDate', startDate)

mpas_analysis/test/test_mpas_climatology_task/QU240.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ oceanHistorySubdirectory = .
2020
oceanNamelistFileName = mpas-o_in
2121
oceanStreamsFileName = streams.ocean
2222
mpasMeshName = oQU240
23-
errorOnMissing = False
2423

2524
[output]
2625
baseDirectory = /dir/for/analysis/output

mpas_analysis/test/test_remap_obs_clim_subtask/remap_obs.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ runSubdirectory = .
1414
oceanHistorySubdirectory = .
1515
oceanNamelistFileName = mpas-o_in
1616
oceanStreamsFileName = streams.ocean
17-
errorOnMissing = False
1817

1918
[output]
2019
baseDirectory = /dir/for/analysis/output

0 commit comments

Comments
 (0)