Closed BaptisteVandecrux closed 1 year ago
Another general thought. I really think the future of the processing will be to only process new transmitted observations on each run during operational processing (or, whatever recent time is needed for smoothing functions, perhaps just a few hrs or a few days). This should significantly reduce the processing time and required compute resources.
Then, if the processing code is changed significantly (or new content added to flag files for historical data!), we could manually run the processing with an optional arg to reprocess the entire historical dataset for every station.
Just something to keep in mind. Perhaps the flag file functions shouldn't be hard-wired to run with every processing run? Or, if we are only processing a few hours of recent data, then it will be OK since the specified flag periods can't be found and we will just move on?
I just wanted to mention this, to make these future potential changes easier to implement....
I've just pushed the changes to aws
whereby initialisation of the object does not automatically start the processing. Now, processing can either commence with the aws.process()
method, or each level processing can be executed step-by-step with aws.getL1()
, aws.getL2()
and aws.getL3()
.
I've also made some changes to the L0toL1
flagging and adjustment steps, mainly how the csv
flag and adjustment files are fetched. This is now a separate function. I tried to follow the advise of @patrickjwright and added a specific exception error.
In this PR, I have implemented the flagging and fixing of data based on user defined csv files. The csv files are currently hosted on https://github.com/GEUS-Glaciology-and-Climate/PROMICE-AWS-data-issues and are downloaded locally where pypromice is being run.
It addresses issues #19 and #18 . Fixes #96
Flag files
They are located in PROMICE-AWS-data-issues/flags and are named after the station they should be applied on.
They are comma-separated and have the following format:
with
- CHECKME
- UNKNOWN
- NAN
- OOL
- VISIT
Adjustment files
They are located in PROMICE-AWS-data-issues/adjustments and are named after the station they should be applied on.
with
- add
- min_filter
- max_filter
- rotate
- smooth
- multiply