diff --git a/SEPTREFHUM.py b/SEPTREFHUM.py index 0c6a49bbc0cc49353548375bb5a0dcce64dfe39d..ae5f60f85a62f7bf1250a6c7ff3b8be854f994ac 100755 --- a/SEPTREFHUM.py +++ b/SEPTREFHUM.py @@ -11,6 +11,7 @@ import pytz import netCDF4 as nc +### Config TODO: Make part of config file? # TODO: Figure out where files will be collected from and stored to. infile_path = "in/" outfile_path = "out/" @@ -25,11 +26,11 @@ local_timezone = pytz.timezone("Europe/Oslo") # Empty the tmpfile folder subprocess.run("rm %s*" % tmpfile_path, shell=True) -weatherdata_files = glob.glob("%sanalysis-*.nc" % infile_path) +weatherdata_files = glob.glob("%sweather-*.nc" % infile_path) # Iterate the set of hourly weather data files for file in weatherdata_files: - file_date = file[file.index("analysis")+9:file.index("analysis")+19] + file_date = file[file.index("weather")+8:file.index("weather")+18] # Assuming we're in the summer wh_sum_date = datetime.fromisoformat("%sT00:00:00%s" % (file_date, utc_offset)) #print(wh_sum_date)