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
55587d9b
Commit
55587d9b
authored
4 years ago
by
thopri
Browse files
Options
Download
Email Patches
Plain Diff
added commandline spinner
parent
45a53863
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
11 deletions
+23
-11
docs/source/intro.rst
docs/source/intro.rst
+4
-1
docs/source/troubleshooting.rst
docs/source/troubleshooting.rst
+3
-0
inputs/namelist_cmems.bdy
inputs/namelist_cmems.bdy
+3
-3
inputs/namelist_remote.bdy
inputs/namelist_remote.bdy
+4
-4
pynemo/pynemo_exe.py
pynemo/pynemo_exe.py
+7
-2
pynemo/reader/ncml.py
pynemo/reader/ncml.py
+2
-1
No files found.
docs/source/intro.rst
View file @
55587d9b
...
...
@@ -18,4 +18,7 @@ algorithm. The idea behind this targetted method is that it provides a generic
method
of
interpolation
for
any
flavour
of
ocean
model
in
order
to
set
up
a
regional
NEMO
model
configuration
.
At
present
(
alpha
release
)
the
tools
do
not
contain
many
options
,
but
those
that
exist
are
accessed
either
through
a
NEMO
style
namelist
or
a
convient
GUI
.
namelist
or
a
convient
GUI
.
PyNEMO
has
been
updated
to
include
integration
with
CMEMS
data
repository
and
the
ability
to
produce
tidal
boundaries
using
TPXO
or
FES2014
as
boundary
input
.
This diff is collapsed.
Click to expand it.
docs/source/troubleshooting.rst
View file @
55587d9b
Troubleshooting
===============
**Always** check the PyNEMO log file. This is usually saved in the working directory of PyNEMO as nrct.log. It gives helpful information
which may help to diagnose issues. E.g. ValueErrors that are result of a THREDDS server being down and unable to provide data files.
1. pyNEMO crashing in MacOSX (Yosemite)?
* Downgrade the scipy package to 0.15
...
...
This diff is collapsed.
Click to expand it.
inputs/namelist_cmems.bdy
View file @
55587d9b
...
...
@@ -52,10 +52,10 @@
! CMEMS Data Source Configuration
!------------------------------------------------------------------------------
ln_use_cmems = .true.
ln_download_cmems = .
tru
e.
ln_download_cmems = .
fals
e.
sn_cmems_dir = '/Users/thopri/Projects/PyNEMO/inputs/' ! where to download CMEMS input files (static and variable)
ln_download_static = .
fals
e.
ln_subset_static = .
fals
e.
ln_download_static = .
tru
e.
ln_subset_static = .
tru
e.
nn_num_retry = 4 ! how many times to retry CMEMS download after non critical errors?
!------------------------------------------------------------------------------
! CMEMS MOTU Configuration (for Boundary Data)
...
...
This diff is collapsed.
Click to expand it.
inputs/namelist_remote.bdy
View file @
55587d9b
...
...
@@ -68,7 +68,7 @@
! unstructured open boundaries tidal parameters
!------------------------------------------------------------------------------
ln_tide = .true. ! =T : produce bdy tidal conditions
sn_tide_model = '
fes
' ! Name of tidal model (fes|tpxo)
sn_tide_model = '
tpxo
' ! Name of tidal model (fes|tpxo)
clname(1) = 'M2' ! constituent name
clname(2) = 'S2'
clname(3) = 'O1'
...
...
@@ -86,9 +86,9 @@
sn_dst_calendar = 'gregorian' ! output calendar format
nn_base_year = 1960 ! base year for time counter
! TPXO file locations
sn_tide_grid = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/grid_tpxo
7.2
.nc'
sn_tide_h = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/h_tpxo
7.2
.nc'
sn_tide_u = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/u_tpxo
7.2
.nc'
sn_tide_grid = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/grid_tpxo
9
.nc'
sn_tide_h = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/h_tpxo
9.v2a
.nc'
sn_tide_u = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/u_tpxo
9.v2a
.nc'
! location of FES data
sn_tide_fes = '/Users/thopri/Projects/PyNEMO/DATA/FES/'
...
...
This diff is collapsed.
Click to expand it.
pynemo/pynemo_exe.py
View file @
55587d9b
...
...
@@ -11,6 +11,9 @@ import logging
# Logging set to info
logging
.
basicConfig
(
level
=
logging
.
INFO
)
import
time
from
yaspin
import
yaspin
from
yaspin.spinners
import
Spinners
def
main
():
""" Main function which checks the command line parameters and
passes them to the profile module for processing """
...
...
@@ -37,7 +40,8 @@ def main():
elif
opt
in
(
"-d"
,
"--download_cmems"
):
setup_file
=
arg
t0
=
time
.
time
()
profile
.
download_cmems
(
setup_file
)
with
yaspin
(
Spinners
.
earth
,
text
=
'PyNEMO is running'
):
profile
.
download_cmems
(
setup_file
)
t1
=
time
.
time
()
print
(
"CMEMS download time: %s"
%
(
t1
-
t0
))
sys
.
exit
(
0
)
...
...
@@ -49,7 +53,8 @@ def main():
#Logger
#logger = logging.getLogger(__name__)
t0
=
time
.
time
()
profile
.
process_bdy
(
setup_file
,
mask_gui
)
with
yaspin
(
Spinners
.
earth
,
text
=
'PyNEMO is running'
):
profile
.
process_bdy
(
setup_file
,
mask_gui
)
t1
=
time
.
time
()
print
(
"Execution Time: %s"
%
(
t1
-
t0
))
...
...
This diff is collapsed.
Click to expand it.
pynemo/reader/ncml.py
View file @
55587d9b
...
...
@@ -14,6 +14,7 @@ from cftime import utime
ncmlpath
,
file_name
=
os
.
path
.
split
(
__file__
)
ncmlpath
=
os
.
path
.
join
(
ncmlpath
,
"jars"
,
"netcdfAll-4.6.jar"
)
jnius_config
.
set_classpath
(
'.'
,
ncmlpath
)
logger
=
logging
.
getLogger
(
__name__
)
try
:
if
os
.
environ
[
'http_proxy'
]
is
not
None
:
#split the proxy name and port
...
...
@@ -22,7 +23,7 @@ try:
proxy_port
=
proxylist
[
1
]
jnius_config
.
add_options
(
'-Dhttp.proxyHost='
+
proxy_host
,
'-Dhttp.proxyPort='
+
proxy_port
)
except
:
print
(
"Didn't find a proxy environment variable"
)
logger
.
info
(
"Didn't find a proxy environment variable"
)
NetcdfDataset
=
None
NcMLReader
=
None
Section
=
None
...
...
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