Commit a1d31e78 authored by Martin Schrön's avatar Martin Schrön
Browse files

Allow nan values for calibration data

parent 2e253ee6
......@@ -1446,8 +1446,8 @@ def main(configfile=None, cfg_prefix=None):
end = dateutil.parser.parse(config['conversion']['campaign_end']).replace(tzinfo=pytz.UTC)
datac = data.copy()
datac = datac.loc[start:end]
Nc = datac[Nfinal].mean()
Nc_err = datac[Nfinal].std()
Nc = datac[Nfinal].nanmean()
Nc_err = datac[Nfinal].nanstd()
print('(sm=%.3f, N=%.0f, bd=%.3f, lw=%.3f, owe=%.3f)' % (float(config['conversion']['measured_sm']), Nc, data.bd.mean(), data.lw.mean(), data.owe.mean()))
N0 = Calibrate_N0_Desilets(Nc, float(config['conversion']['measured_sm']), bd=data.bd.mean(), lw=data.lw.mean(), owe=data.owe.mean(),
a0=float(config['conversion']['a0']), a1=float(config['conversion']['a1']), a2=float(config['conversion']['a2'])) # Nc/(float(config['conversion']['a0']) / (float(config['conversion']['measured_sm'])/float(config['conversion']['bulk_density']) + float(config['conversion']['a2']) + float(config['conversion']['lattice_water']) + float(config['conversion']['soil_org_carbon'])*0.556) + float(config['conversion']['a1']))
......
Supports Markdown
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