From 8a22757b0539123f45d4752fa785b05000f6da18 Mon Sep 17 00:00:00 2001 From: Mads Christian Lund Date: Thu, 21 Nov 2024 13:50:16 +0100 Subject: [PATCH] Removed unused write methods from the AWS class I couldn't see any usages of writeArr, writeL2 and writeL3 in the repository. --- src/pypromice/process/aws.py | 38 ------------------------------------ 1 file changed, 38 deletions(-) diff --git a/src/pypromice/process/aws.py b/src/pypromice/process/aws.py index e1285fee..2e7c6976 100644 --- a/src/pypromice/process/aws.py +++ b/src/pypromice/process/aws.py @@ -123,22 +123,6 @@ def process(self): self.getL2() self.getL3() - def writeL2(self, outpath): - """Write L2 data to .csv and .nc file""" - if os.path.isdir(outpath): - self.writeArr(self.L2, outpath) - else: - logger.info(f"Outpath f{outpath} does not exist. Unable to save to file") - pass - - def writeL3(self, outpath): - """Write L3 data to .csv and .nc file""" - if os.path.isdir(outpath): - self.writeArr(self.L3, outpath) - else: - logger.info(f"Outpath f{outpath} does not exist. Unable to save to file") - pass - def getL1(self): """Perform L0 to L1 data processing""" logger.info("Level 1 processing...") @@ -164,28 +148,6 @@ def getL3(self): logger.info("Level 3 processing...") self.L3 = toL3(self.L2, data_adjustments_dir=self.data_issues_repository / "adjustments") - def writeArr(self, dataset, outpath, t=None): - """Write L3 data to .nc and .csv hourly and daily files - - Parameters - ---------- - dataset : xarray.Dataset - Dataset to write to file - outpath : str - Output directory - t : str - Resampling string. This is automatically defined based - on the data type if not given. The default is None. - """ - if t is not None: - write.prepare_and_write(dataset, outpath, self.vars, self.meta, t) - else: - f = [l.attrs["format"] for l in self.L0] - if "raw" in f or "STM" in f: - write.prepare_and_write(dataset, outpath, self.vars, self.meta, "10min") - else: - write.prepare_and_write(dataset, outpath, self.vars, self.meta, "60min") - def loadConfig(self, config_file, inpath): """Load configuration from .toml file