コード例 #1
0
ファイル: mean_xy.py プロジェクト: PCMDI/pcmdi_metrics
def compute(d):
    """Computes bias"""
    if d is None:  # just want the doc
        return {
            "Name": "Mean",
            "Abstract": "Area Mean (area weighted)",
            "Contact": "*****@*****.**",
        }
    return MV2.float(cdutil.averager(d, axis="xy", weights="weighted"))
コード例 #2
0
ファイル: bias.py プロジェクト: durack1/pcmdi_metrics
def compute(dm, do):
    """ Computes bias"""
    if dm is None and do is None:  # just want the doc
        return {
            "Name": "Bias",
            "Abstract": "Compute Full Average of Model - Observation",
            "Contact": "Peter Gleckler <*****@*****.**>",
        }
    return MV2.float(MV2.average(MV2.subtract(dm, do)))
コード例 #3
0
ファイル: mean_xy.py プロジェクト: PCMDI/pcmdi_metrics
def compute(d):
    """ Computes bias"""
    if d is None:  # just want the doc
        return {
            "Name": "Mean",
            "Abstract": "Area Mean (area weighted)",
            "Contact": "*****@*****.**",
        }
    return MV2.float(cdutil.averager(d, axis='xy', weights='weighted'))
コード例 #4
0
ファイル: bias_xyt.py プロジェクト: PCMDI/pcmdi_metrics
def compute(dm, do):
    """Computes bias"""
    if dm is None and do is None:  # just want the doc
        return {
            "Name": "Bias",
            "Abstract": "Compute Full Average of Model - Observation",
            "Contact": "*****@*****.**",
        }
    dif = MV2.subtract(dm, do)
    return MV2.float(cdutil.averager(dif, axis="xyt", weights="weighted"))
コード例 #5
0
ファイル: bias_xyt.py プロジェクト: PCMDI/pcmdi_metrics
def compute(dm, do):
    """ Computes bias"""
    if dm is None and do is None:  # just want the doc
        return {
            "Name": "Bias",
            "Abstract": "Compute Full Average of Model - Observation",
            "Contact": "*****@*****.**",
        }
    dif = MV2.subtract(dm, do)
    return MV2.float(cdutil.averager(dif, axis='xyt', weights='weighted'))
コード例 #6
0
ファイル: bias.py プロジェクト: gleckler1/pcmdi_metrics
def compute(dm, do):
    """ Computes bias"""
    return MV.float(MV.average(MV.subtract(dm, do)))
コード例 #7
0
def compute(dm,do):
    """ Computes bias"""
    return MV.float(MV.average(MV.subtract(dm,do)))