Commit 4207f81c authored by Clément Haëck's avatar Clément Haëck
Browse files

Fix computation of front proba

parent 8d29eadd
......@@ -5,7 +5,6 @@ For both S/N zones.
"""
from os import path
import numpy as np
import xarray as xr
import lib
......@@ -29,9 +28,9 @@ def main():
ds = xr.merge([lib.fix_time_daily(d) for d in [sst, hi]],
join='inner')
ds['HI'] = lib.data.hi.apply_coef(hi, lib.data.hi.get_coef(args))
ds['HI'] = lib.data.hi.apply_coef(ds, lib.data.hi.get_coef(args))
frt = (ds.HI > args['threshold']) * 1.
frt = frt.where(np.isfinite(ds.sst))
frt = frt.where(ds.sst.notnull())
tot = frt.mean('time')
var_name = 'p_frt'
......
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