Exemple #1
0
def set_variable_attribute(var_id, name, value):
    """Sets an attribute onto a cmor variable
    Usage:
      cmor.set_variable_attribute(var_id,name,value)
    Where:
      var_id: is cmor variable id
      name  : is the name of the attribute
      value : is the value for this attribute
    """
    if value is None:
        val = ""
    else:
        val = str(value)
    return _cmip6_cv.set_variable_attribute(var_id, name, val)
Exemple #2
0
def set_variable_attribute(var_id, name, value):
    """Sets an attribute onto a cmor variable
    Usage:
      cmor.set_variable_attribute(var_id,name,value)
    Where:
      var_id: is cmor variable id
      name  : is the name of the attribute
      value : is the value for this attribute
    """
    if value is None:
        val = ""
    else:
        val = str(value)
    return _cmip6_cv.set_variable_attribute(var_id, name, val)