def updateMessages(self,
            parameters):
        # Modify messages created by internal validation for each parameter.
        # This method is called after internal validation.
        class_ = self.__class__
        dataset_parameter = parameters[0]
        variables_parameter = parameters[1]
        output_file_parameter = parameters[2]
        extent_parameter = parameters[3]
        dimensions_parameter = parameters[4]
        value_selection_method_parameter = parameters[5]

        value_selection_method = mds.SELECT_BY_VALUE if \
            value_selection_method_parameter.valueAsText == "BY_VALUE" else \
                mds.SELECT_BY_INDEX

        dataset = None

        # Dataset.
        if not dataset_parameter.value is None:
            try:
                dataset = mds.netcdf.Dataset(dataset_parameter.valueAsText,
                    filter_out_nd_coordinates=True)
            except __HOLE__, exception:
                if "No such file or directory" in str(exception) or \
                        "Invalid argument" in str(exception):
                    class_.set_error(dataset_parameter,
                        mds.messages.INPUT_DATASET_DOES_NOT_RESOLVE_TO_FILENAME.format(
                            dataset_parameter.valueAsText))
                elif "Malformed or inaccessible DAP DDS" in str(exception):
                    class_.set_error(dataset_parameter,
                        mds.messages.INPUT_DATASET_URL_MALFORMED.format(
                            dataset_parameter.valueAsText))
                else:
                    class_.set_error(dataset_parameter,
                        mds.messages.INPUT_DATASET_GENERIC_ERROR.format(
                            dataset_parameter.valueAsText, str(exception)))
            except Exception, exception:
                class_.set_error(dataset_parameter,
                    mds.messages.INPUT_DATASET_GENERIC_ERROR.format(
                        dataset_parameter.valueAsText, str(exception)))

        # Variables.
        if variables_parameter.values is not None:
            if dataset is not None:
                variable_names_available = dataset.data_variable_names()
                variable_names_requested = mds.OrderedSet(
                    variables_parameter.values)
                unknown_variable_names = variable_names_requested - \
                    variable_names_available
                known_variable_names = variable_names_requested - \
                    unknown_variable_names

                if unknown_variable_names:
                    class_.set_warning(variables_parameter,
                        mds.messages.VARIABLES_DO_NOT_EXIST.format(", ".join(
                            unknown_variable_names), "Input OPeNDAP Dataset"))

                if len(known_variable_names) == 0:
                    class_.set_error(variables_parameter,
                        mds.messages.NONE_OF_VARIABLES_EXISTS)
                elif not class_.variables_are_compatible(
                        known_variable_names, dataset):
                    class_.set_error(variables_parameter,
                        mds.messages.VARIABLES_MUST_SHARE_DIMENSIONS)

                # Determine names of dimensions that are present in the
                # selected variables.
                dimension_names = set()
                for variable_name in known_variable_names:
                    variable = dataset.variable(variable_name)
                    for dimension_name in variable.dimensions:
                        dimension_names.add(dimension_name)

                for dimension_name in dimension_names:
                    if dimension_name in dataset.variable_names():
                        if len(dataset.variable(dimension_name)[:].shape) > 1:
                            class_.set_error(variables_parameter,
                                mds.messages.MULTIDIMENSIONAL_DIMENSIONS_NOT_SUPPORTED.format(
                                    dimension_name))
                            break

        # Output file.
        if output_file_parameter.value is not None:
            output_filename = output_file_parameter.valueAsText
            if os.path.splitext(output_filename)[1] != ".nc":
                class_.set_error(output_file_parameter,
                    mds.messages.OUTPUT_FILE_EXTENSION_MUST_BE_NC)

        # Dimensions.
        # Check whether the selected dimensions are present in the selected
        # variables.
        if dimensions_parameter.value is not None:
            if dataset is not None:
                if variables_parameter.values is not None:
                    # Determine names of dimensions that are present in the
                    # selected variables.
                    dimension_names = set()
                    for variable_name in variables_parameter.values:
                        if variable_name in dataset.dataset.variables:
                            variable = dataset.variable(variable_name)
                            for dimension_name in variable.dimensions:
                                dimension_names.add(dimension_name)

                    for dimension_record in dimensions_parameter.values:
                        # Test whether selected dimensions are present in the
                        # collection just filled.
                        dimension_name = dimension_record[0]
                        if dimension_name not in dimension_names:
                            class_.set_error(dimensions_parameter,
                                mds.messages.DIMENSION_NOT_PRESENT.format(
                                    dimension_record[0]))
                            break
                        elif dimension_name in dataset.variable_names():
                            if len(dataset.variable(dimension_name)[:].shape) > 1:
                                class_.set_error(dimensions_parameter,
                                    mds.messages.MULTIDIMENSIONAL_DIMENSIONS_NOT_SUPPORTED.format(
                                        dimension_name))
                                break

                            if value_selection_method == mds.SELECT_BY_VALUE \
                                    and dataset.convention.is_time_dimension_variable(
                                        dimension_name):
                                # Check format of temporal coordinates.
                                _, start_value, end_value = dimension_record
                                try:
                                    mds.date_time.from_iso_format(start_value)
                                    mds.date_time.from_iso_format(end_value)
                                except ValueError:
                                    class_.set_error(dimensions_parameter,
                                        mds.messages.INVALID_DATE_TIME)
                                    break
                            elif dataset.convention.is_space_dimension_variable(
                                    dimension_name):

                                class_.set_error(dimensions_parameter,
                                    mds.messages.SKIPPING_SPATIAL_DIMENSION)
                                break
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/tools/opendap_to_netcdf.py/OPeNDAPtoNetCDF.updateMessages