From f7cf069e470b94fcb87728ca02e8710831aaf2c1 Mon Sep 17 00:00:00 2001
From: thopri <thopri@noc.ac.uk>
Date: Tue, 31 Mar 2020 09:57:57 +0100
Subject: [PATCH] small update to dl script

---
 README.rst                  | 3 +++
 inputs/namelist_cmems.bdy   | 2 +-
 pynemo/nemo_bdy_dl_cmems.py | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/README.rst b/README.rst
index 3e9c474..42607ce 100644
--- a/README.rst
+++ b/README.rst
@@ -78,6 +78,9 @@ needs to be created with two defined strings one called user and the other calle
 **IMPORTANT** This will create a py file in the right place with the parameters required to download CMEMS, the password is stored as plain text so please
 do not reuse any existing password!
 
+PyNEMO creates a log file be default, this provided info, warning and error messages. By default this is called nrct.log and is saved in the directory where pynemo is run from. (usually /PyNEMO)
+New runs are appended onto the end of the log file so it will periodically need to be delelted to reduce the size of the log.
+
 **Additional NOTES**
 
 The above path for Java Home was valid for a Macbook Pro 2015 with macOS Catalina and Java SDK 13.0.2
diff --git a/inputs/namelist_cmems.bdy b/inputs/namelist_cmems.bdy
index 531ad64..2883afb 100644
--- a/inputs/namelist_cmems.bdy
+++ b/inputs/namelist_cmems.bdy
@@ -56,7 +56,7 @@
    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.
-   nn_num_retry             = 1 ! how many times to retry CMEMS download after non critical errors?
+   nn_num_retry             = 4 ! how many times to retry CMEMS download after non critical errors?
 !------------------------------------------------------------------------------
 !  CMEMS MOTU Configuration (for Boundary Data)
 !------------------------------------------------------------------------------
diff --git a/pynemo/nemo_bdy_dl_cmems.py b/pynemo/nemo_bdy_dl_cmems.py
index 54fcbc5..616517c 100644
--- a/pynemo/nemo_bdy_dl_cmems.py
+++ b/pynemo/nemo_bdy_dl_cmems.py
@@ -288,7 +288,7 @@ def request_cmems(args, date_min, date_max):
                             line = line.replace("[ INFO]", "")
                             logger.info(line)
                             if 'Error' in line:
-                                return 'Error found in CMEMS download report, please check downloaded data'
+                                return line
                             if 'Done' in line:
                                 logger.info('download of request data file for variable ' + ' '.join(grids[key]) + ' successful')
                     if p.returncode != 0:
-- 
GitLab