diff --git a/docs/source/intro.rst b/docs/source/intro.rst index 463a8df2bc2fc96eb4afb33ba20b3f176263b350..3b6be276899694f6bd08814dd9ab7ac2a4946f23 100644 --- a/docs/source/intro.rst +++ b/docs/source/intro.rst @@ -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. diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst index 769efdbba38af7e4392863a0c60a2d43923fd230..2347dfdc0ddbd93f9dc499baaa2b7005eede08fa 100644 --- a/docs/source/troubleshooting.rst +++ b/docs/source/troubleshooting.rst @@ -1,6 +1,9 @@ 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 diff --git a/inputs/namelist_cmems.bdy b/inputs/namelist_cmems.bdy index 2883afb3daff2578d81827e84aaeea438b16c236..20119d57e12fc00912f7a9a115d9a0a40ef9fb06 100644 --- a/inputs/namelist_cmems.bdy +++ b/inputs/namelist_cmems.bdy @@ -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) diff --git a/inputs/namelist_remote.bdy b/inputs/namelist_remote.bdy index fb8d6bf34b67f3614cd4235f3010b80256fb786a..81bb8c493c4090ac7806b8a84effc39c92ea8292 100644 --- a/inputs/namelist_remote.bdy +++ b/inputs/namelist_remote.bdy @@ -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/' diff --git a/pynemo/pynemo_exe.py b/pynemo/pynemo_exe.py index 1f8fb043d9e538582a9919469b7536fec1bf2f6d..706985361234ac78dfef414fad98c3e9f8133db0 100644 --- a/pynemo/pynemo_exe.py +++ b/pynemo/pynemo_exe.py @@ -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)) diff --git a/pynemo/reader/ncml.py b/pynemo/reader/ncml.py index 7275f051a09e029a367a34530c5f78da8c7003ab..67c0e4c7bb2ac23916ababe62e1bd8e3ba49fbd1 100644 --- a/pynemo/reader/ncml.py +++ b/pynemo/reader/ncml.py @@ -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