Commit d92061e6 authored by hugocruzz's avatar hugocruzz
Browse files

requirement updated

parent edc72cd0
Pipeline #329309 passed with stage
in 4 minutes and 8 seconds
This diff is collapsed.
......@@ -4,7 +4,8 @@ import numpy as np
import xarray as xr
import pandas as pd
import matplotlib.pyplot as plt
from envass import qualityassurance
#from envass import qualityassurance
from envass.main import qualityassurance
from datetime import datetime, timezone
import glob
......@@ -82,13 +83,17 @@ def plot_data(df,params):
plt.title(param)
plt.show()
def quality_flags_ds(qa, df):
def quality_flags_ds(qa, ds):
df = ds.copy()
var_name = qa.keys()
for var in var_name:
if var in qa:
qa_arr_simple = qualityassurance(np.array(df[var]), np.array(df["time"]), **qa[var]["simple"])
qa_arr_adv = qualityassurance(np.array(df[var]), np.array(df["time"]), **qa[var]["advanced"])
df[var + "_qual"].values = qa_arr_simple + qa_arr_adv
qa_arr_simple = qualityassurance(np.array(df[var]).copy(), np.array(df["time"]), **qa[var]["simple"])
qa_arr_adv = qualityassurance(np.array(df[var]).copy(), np.array(df["time"]), **qa[var]["advanced"])
qa_arr = qa_arr_simple + qa_arr_adv
qa_arr[qa_arr>1]=1
df[var + "_qual"].values = qa_arr
return df
......
......@@ -4,3 +4,7 @@ netCDF4==1.5.3
PyYAML==5.3
matplotlib==3.1.3
seaborn==0.11.1
scipy==1.5.4
dask==2022.2.0
xarray==0.19.0
envass==0.0.7
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment