Commit 55587d9b authored by thopri's avatar thopri
Browse files

added commandline spinner

parent 45a53863
......@@ -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.
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
......
......@@ -52,10 +52,10 @@
! CMEMS Data Source Configuration
!------------------------------------------------------------------------------
ln_use_cmems = .true.
ln_download_cmems = .true.
ln_download_cmems = .false.
sn_cmems_dir = '/Users/thopri/Projects/PyNEMO/inputs/' ! where to download CMEMS input files (static and variable)
ln_download_static = .false.
ln_subset_static = .false.
ln_download_static = .true.
ln_subset_static = .true.
nn_num_retry = 4 ! how many times to retry CMEMS download after non critical errors?
!------------------------------------------------------------------------------
! CMEMS MOTU Configuration (for Boundary Data)
......
......@@ -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_tpxo7.2.nc'
sn_tide_h = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/h_tpxo7.2.nc'
sn_tide_u = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/u_tpxo7.2.nc'
sn_tide_grid = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/grid_tpxo9.nc'
sn_tide_h = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/h_tpxo9.v2a.nc'
sn_tide_u = '/Users/thopri/Projects/PyNEMO/DATA/TPXO/u_tpxo9.v2a.nc'
! location of FES data
sn_tide_fes = '/Users/thopri/Projects/PyNEMO/DATA/FES/'
......
......@@ -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))
......
......@@ -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
......
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