Commit fae40b03 authored by thopri's avatar thopri
Browse files

added log statements to show CMEMS behaviour more clearly

parent eec64761
...@@ -97,6 +97,8 @@ def download_cmems(setup_filepath=0): ...@@ -97,6 +97,8 @@ def download_cmems(setup_filepath=0):
Setup = setup.Setup(setup_filepath) # default settings file Setup = setup.Setup(setup_filepath) # default settings file
settings = Setup.settings settings = Setup.settings
if settings['download_static'] == False:
logger.info('CMEMS static data download not requested')
if settings['download_static'] == True: if settings['download_static'] == True:
for re in range(settings['num_retry']): for re in range(settings['num_retry']):
logger.info('CMEMS Static data requested: downloading static data now.... (this may take awhile)') logger.info('CMEMS Static data requested: downloading static data now.... (this may take awhile)')
...@@ -121,6 +123,8 @@ def download_cmems(setup_filepath=0): ...@@ -121,6 +123,8 @@ def download_cmems(setup_filepath=0):
sys.exit(static) sys.exit(static)
dl_cmems.clean_up(settings) dl_cmems.clean_up(settings)
# subset downloaded static grid files to match downloaded CMEMS data # subset downloaded static grid files to match downloaded CMEMS data
if settings['subset_static'] == False:
logger.info('CMEMS subset static data not requested')
if settings['subset_static'] == True: if settings['subset_static'] == True:
logger.info('CMEMS subset static data requested: subsetting now......') logger.info('CMEMS subset static data requested: subsetting now......')
subset_static = dl_cmems.subset_static(settings) subset_static = dl_cmems.subset_static(settings)
...@@ -132,6 +136,9 @@ def download_cmems(setup_filepath=0): ...@@ -132,6 +136,9 @@ def download_cmems(setup_filepath=0):
sys.exit(subset_static) sys.exit(subset_static)
dl_cmems.clean_up(settings) dl_cmems.clean_up(settings)
if settings['download_cmems'] == False:
logger.info('CMEMS Boundary data download not requested')
if settings['download_cmems'] == True: if settings['download_cmems'] == True:
logger.info('CMEMS Boundary data requested: starting download process....') logger.info('CMEMS Boundary data requested: starting download process....')
......
...@@ -59,6 +59,9 @@ def test_salinty(): ...@@ -59,6 +59,9 @@ def test_salinty():
assert abs(sal_[sal_ != 0.0].max() - 35) <= 0.001 assert abs(sal_[sal_ != 0.0].max() - 35) <= 0.001
assert abs(sal_[sal_ != 0.0].min() - 35) <= 0.001 assert abs(sal_[sal_ != 0.0].min() - 35) <= 0.001
# TODO: add in checking so that settings in the bdy file are checked to see if
# U and V and SSH tests are required. e.g. ln_dyn2d is set to true.
def test_ssh(): def test_ssh():
test_files = glob.glob('unit_tests/test_outputs/*bdyT*') test_files = glob.glob('unit_tests/test_outputs/*bdyT*')
if len(test_files) == 0: if len(test_files) == 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment