From 169186d2cd4ad2f9e98865f965b996d65ce665c6 Mon Sep 17 00:00:00 2001 From: David Strausz Date: Wed, 30 Oct 2024 11:50:55 -0700 Subject: [PATCH] Removed 'data' directory from pat the soap routine, fixed getCSV parameter in ARGOS_service_data_converter.py --- ARGOS_service_data_converter.py | 6 +++--- getARGO_SOAP.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ARGOS_service_data_converter.py b/ARGOS_service_data_converter.py index 5899db0..571b203 100755 --- a/ARGOS_service_data_converter.py +++ b/ARGOS_service_data_converter.py @@ -110,7 +110,7 @@ def get_data(fobj=None): header=None, names=header, index_col=False, - error_bad_lines=False, + on_bad_lines='warn', dtype={ "year": str, "doy": str, @@ -172,7 +172,7 @@ def get_data(fobj=None): header=None, names=header, index_col=False, - error_bad_lines=False, + on_bad_lines='warn', dtype={ "year": str, "doy": str, @@ -320,7 +320,7 @@ def get_data(fobj=None, time="current"): names=header, index_col=False, usecols=columns, - error_bad_lines=False, + on_bad_lines='warn', dtype=dtype, parse_dates=[["year", "doy", "hhmm"]], date_parser=argo_to_datetime, diff --git a/getARGO_SOAP.py b/getARGO_SOAP.py index c3b4470..20955d6 100644 --- a/getARGO_SOAP.py +++ b/getARGO_SOAP.py @@ -13,7 +13,7 @@ History: 2018-03-14: Make it so either the program number or platform id can be submitted - + 2024-10-30: Remove 'data' directory hard coded into download path Note: To get an idea of all functions available python -mzeep http://ws-argos.clsamerica.com/argosDws/services/DixService?wsdl @@ -105,10 +105,10 @@ datestr = startDate.strftime('%Y%m%d%H%M%S')+'_'+endDate.strftime('%Y%m%d%H%M%S') if args.idMode in ['programNumber']: - with open("data/" + ".".join(['ARGO_'+datestr,filetype]), 'w') as f: + with open(".".join(['ARGO_'+datestr,filetype]), 'w') as f: f.write(result) elif args.idMode in ['platformId']: - with open("data/" + ".".join(['ARGO_'+args.idnumber+'_'+datestr,filetype]), 'w') as f: + with open(".".join(['ARGO_'+args.idnumber+'_'+datestr,filetype]), 'w') as f: f.write(result) else: - print("No file written") \ No newline at end of file + print("No file written")