Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
thopri
PyNEMO
Commits
fae40b03
Commit
fae40b03
authored
5 years ago
by
thopri
Browse files
Options
Download
Email Patches
Plain Diff
added log statements to show CMEMS behaviour more clearly
parent
eec64761
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
pynemo/profile.py
pynemo/profile.py
+7
-0
unit_tests/unit_test.py
unit_tests/unit_test.py
+3
-0
No files found.
pynemo/profile.py
View file @
fae40b03
...
...
@@ -97,6 +97,8 @@ def download_cmems(setup_filepath=0):
Setup
=
setup
.
Setup
(
setup_filepath
)
# default settings file
settings
=
Setup
.
settings
if
settings
[
'download_static'
]
==
False
:
logger
.
info
(
'CMEMS static data download not requested'
)
if
settings
[
'download_static'
]
==
True
:
for
re
in
range
(
settings
[
'num_retry'
]):
logger
.
info
(
'CMEMS Static data requested: downloading static data now.... (this may take awhile)'
)
...
...
@@ -121,6 +123,8 @@ def download_cmems(setup_filepath=0):
sys
.
exit
(
static
)
dl_cmems
.
clean_up
(
settings
)
# 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
:
logger
.
info
(
'CMEMS subset static data requested: subsetting now......'
)
subset_static
=
dl_cmems
.
subset_static
(
settings
)
...
...
@@ -132,6 +136,9 @@ def download_cmems(setup_filepath=0):
sys
.
exit
(
subset_static
)
dl_cmems
.
clean_up
(
settings
)
if
settings
[
'download_cmems'
]
==
False
:
logger
.
info
(
'CMEMS Boundary data download not requested'
)
if
settings
[
'download_cmems'
]
==
True
:
logger
.
info
(
'CMEMS Boundary data requested: starting download process....'
)
...
...
This diff is collapsed.
Click to expand it.
unit_tests/unit_test.py
View file @
fae40b03
...
...
@@ -59,6 +59,9 @@ def test_salinty():
assert
abs
(
sal_
[
sal_
!=
0.0
].
max
()
-
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
():
test_files
=
glob
.
glob
(
'unit_tests/test_outputs/*bdyT*'
)
if
len
(
test_files
)
==
0
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment