In [1]:
%run basics
%matplotlib


Using matplotlib backend: Qt4Agg

In [2]:
cf = qcio.load_controlfile()

In [3]:
file_path = qcutils.get_keyvaluefromcf(cf,["Files"],"file_path")
infilename = qcutils.get_keyvaluefromcf(cf,["Files"],"in_filename")
l5name = file_path+infilename
print l5name
ds5 = qcio.nc_read_series(l5name)


../Sites/Tumbarumba/Data/Processed/all/Tumbarumba_L5.nc

In [4]:
ds6 = qcio.copy_datastructure(cf,ds5)

In [5]:
qcutils.UpdateGlobalAttributes(cf,ds6,"L6")

In [6]:
qcrp.ParseL6ControlFile(cf,ds6)

In [7]:
qcgf.ImportSeries(cf,ds6)

In [8]:
if ("Fsd_syn" not in ds6.series.keys() or
    "solar_altitude" not in ds6.series.keys()): qcts.get_synthetic_fsd(ds6)

In [9]:
qcrp.GetFreFromFc(cf,ds6)


WARNING:qc.rp: CPD results filename not in control file

In [10]:
Fre,Fre_flag,Fre_attr=qcutils.GetSeries(ds6,"Fre")
Fc,Fc_flag,Fc_attr=qcutils.GetSeries(ds6,"Fc")
print min(Fre),min(Fc)
print 8 in Fre_flag,8 in Fc_flag
index = numpy.where(Fre==-9999)[0]
print len(Fre),len(index)


-9999.0 -49.2868841748
False False
122710 114993

In [11]:
qcrp.FreUsingSOLO(cf,ds6)

In [12]:
Fre_SOLO_all,f,a=qcutils.GetSeries(ds6,"Fre_SOLO_all")
print min(Fre_SOLO_all)


-1.7243

In [13]:
qcrp.FreUsingFFNET(cf,ds6)

In [14]:
Fre_FFNET_all,f,a=qcutils.GetSeries(ds6,"Fre_FFNET_all")
print min(Fre_FFNET_all)


-20.3559563204

In [15]:
qcts.MergeSeriesUsingDict(ds6,merge_order="standard")

In [16]:
Fre_SOLO,f,a=qcutils.GetSeries(ds6,"Fre_SOLO")
print min(Fre_SOLO)


-49.2868841748

In [17]:
print max(Fre_SOLO)


47.7344640742

In [18]:
index=numpy.where(Fre_SOLO==-9999)[0]

In [19]:
print len(index)


0

In [33]:
dt=ds6.series["DateTime"]["Data"]

In [34]:
print dt[index[0]]


2001-02-23 16:00:00

In [35]:
print index[0]


1287

In [42]:
Fsd,Fsd_flag,Fsd_attr=qcutils.GetSeries(ds6,"Fsd")
ustar,ustar_flag,ustar_attr=qcutils.GetSeries(ds6,"ustar")
print Fre[1286:1290],Fre_flag[1286:1290]
print Fc[1286:1290],Fc_flag[1286:1290]
print Fsd[1286:1290],Fsd_flag[1286:1290]
print ustar[1286:1290],ustar_flag[1286:1290]


[-9999. -9999. -9999. -9999.] [61  0  0 62]
[-17.996       -5.56892014  -8.14562776   0.31901555] [30  0  0  0]
[ 900.5   613.38  366.03  154.25] [0 0 0 0]
[ 0.60175543  0.67238793  0.56304166  0.41522211] [0 0 0 0]

In [ ]: