Skip to content

Commit

Permalink
removed the folder style wyhr which isn't used much, a proposal for #71
Browse files Browse the repository at this point in the history
… which will greatly reduce the awsm codebase
  • Loading branch information
scotthavens committed Sep 21, 2020
1 parent 4c6f4e7 commit cc42e8a
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions awsm/framework/CoreConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ desc: description = project description that will be stored in text
file in project directory. You cannot use punctuation here
because config readers cannot deal with that

folder_date_style: default = wyhr,
options = [wyhr day start_end],
folder_date_style: default = start_end,
options = [day start_end],
description = style of date that gets appended to
generated folders for each date range that is simulated

Expand Down Expand Up @@ -122,7 +122,7 @@ update: default = False,
description = should we update depth with LiDAR at given
intervals

update_file: type = discretionarycriticalfilename,
update_file: type = DiscretionaryCriticalFilename,
description = netCDF containing depth images and dates for
updating

Expand All @@ -135,7 +135,7 @@ flight_numbers: type = int list,
description = list of flight number integers to use. Integers
start at 1. Default uses all within date range

update_change_file: type = discretionarycriticalfilename,
update_change_file: type = Filename,
description = optional file to save the changes in swe depth
and density resulting from a depth update

Expand Down
1 change: 1 addition & 0 deletions awsm/framework/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def read_config(self, config):
if len(errors) > 0:
print("Errors in the config file. "
"See configuration status report above.")
sys.exit()

def load_topo(self):

Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/basins/Lakes/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ path_dr: ./output
basin: lakes
proj: lakes_gold
desc: Lakes gold HRRR simulation
folder_date_style: wyhr
folder_date_style: start_end


################################################################################
Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/basins/Lakes/gold_hrrr/make_gold_hrrr
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then
awsm tests/basins/Lakes/gold_hrrr/gold_config.ini

echo "Cleaning up"
mv tests/basins/Lakes/gold_hrrr/lakes/devel/wy2020/lakes_gold/runs/run0015_0017/*.nc \
mv tests/basins/Lakes/gold_hrrr/lakes/devel/wy2020/lakes_gold/runs/run20191001_20191001/*.nc \
tests/basins/Lakes/gold_hrrr
rm -rf tests/basins/Lakes/gold_hrrr/lakes
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then
awsm tests/basins/Lakes/gold_hrrr_update/gold_config.ini

echo "Cleaning up"
mv tests/basins/Lakes/gold_hrrr_update/lakes/devel/wy2020/lakes_gold/runs/run0015_0017/*.nc \
mv tests/basins/Lakes/gold_hrrr_update/lakes/devel/wy2020/lakes_gold/runs/run20191001_20191001/*.nc \
tests/basins/Lakes/gold_hrrr_update
rm -rf tests/basins/Lakes/gold_hrrr_update/lakes
else
Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/basins/RME/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ path_dr: ./output
basin: rme
proj: rme_test
desc: fast rme test run
folder_date_style: wyhr
folder_date_style: start_end


################################################################################
Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/basins/RME/gold/make_gold_stations
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then
awsm tests/RME/gold/gold_config.ini

echo "Cleaning up"
mv tests/RME/gold/rme/devel/wy1986/rme_test/runs/run3337_3344/*.nc tests/RME/gold/
mv tests/RME/gold/rme/devel/wy1986/rme_test/runs/run19860217_19860217/*.nc tests/RME/gold/
rm -r tests/RME/gold/rme/
else
echo "RME station gold files not updated"
Expand Down
4 changes: 2 additions & 2 deletions awsm/tests/test_awsm_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ def assert_rme_wyhr(self, a):
self.assertEqual(
a.path_output,
str(self.basin_dir.joinpath(
'output/rme/wy1986/rme_test/run3337_3344'))
'output/rme/wy1986/rme_test/run19860217_19860217'))
)
self.assertEqual(
a.path_log,
str(self.basin_dir.joinpath(
'output/rme/wy1986/rme_test/run3337_3344/logs'))
'output/rme/wy1986/rme_test/run19860217_19860217/logs'))
)

def test_directory_creation_wyhr(self):
Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/test_awsm_lakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUpClass(cls):
cls.gold_snow = os.path.join(cls.gold_dir, 'snow.nc')

cls.output_path = cls.basin_dir.joinpath(
'output/lakes/wy2020/lakes_gold/run0015_0017'
'output/lakes/wy2020/lakes_gold/run20191001_20191001'
)

run_awsm(cls.config_file)
Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/test_awsm_lakes_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUpClass(cls):
cls.gold_snow = os.path.join(cls.gold_dir, 'snow.nc')

cls.output_path = cls.basin_dir.joinpath(
'output/lakes/wy2020/lakes_gold/run0015_0017'
'output/lakes/wy2020/lakes_gold/run20191001_20191001'
)

config = cls.base_config_copy()
Expand Down
4 changes: 2 additions & 2 deletions awsm/tests/test_awsm_lakes_lidar_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUpClass(cls):
cls.gold_snow = os.path.join(cls.gold_dir, 'snow.nc')

cls.output_path = cls.basin_dir.joinpath(
'output/lakes/wy2020/lakes_gold/run0015_0017'
'output/lakes/wy2020/lakes_gold/run20191001_20191001'
)

config = cls.base_config_copy()
Expand All @@ -31,7 +31,7 @@ def setUpClass(cls):
'update_file': './topo/lidar_depths.nc',
'buffer': 400,
'flight_numbers': 1,
'update_change_file': 'output/lakes/wy2020/lakes_gold/run0015_0017/model_lidar_change.nc' # noqa
'update_change_file': 'output/lakes/wy2020/lakes_gold/run20191001_20191001/model_lidar_change.nc' # noqa
}
}
config.raw_cfg.update(adj_config)
Expand Down
2 changes: 1 addition & 1 deletion awsm/tests/test_awsm_rme.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUpClass(cls):
cls.gold_snow = os.path.join(cls.gold_dir, 'snow.nc')

cls.output_path = cls.basin_dir.joinpath(
'output/rme/wy1986/rme_test/run3337_3344'
'output/rme/wy1986/rme_test/run19860217_19860217'
)

run_awsm(cls.config_file)
Expand Down

0 comments on commit cc42e8a

Please sign in to comment.