def execute(self,
            parameters,
            messages):
        dataset_name = parameters[0].valueAsText
        variable_names = mds.OrderedSet(parameters[1].values)
        output_filename = parameters[2].valueAsText

        extent = None
        if parameters[3].value is not None:
            extent = [float(value) for value in
                parameters[3].valueAsText.split(" ")]

        dimension_records = parameters[4].values
        value_selection_method = mds.SELECT_BY_VALUE if \
            parameters[5].valueAsText == "BY_VALUE" else mds.SELECT_BY_INDEX
        date_time_string = time.strftime("%m/%d/%Y %H:%M", time.localtime())
        history_message = mds.messages.OPENDAP_TO_NETCDF_HISTORY.format(
            date_time_string, dataset_name)

        try:
            dataset = mds.netcdf.Dataset(dataset_name,
                filter_out_nd_coordinates=True)

            # Get rid of the variable names that are not part of the dataset.
            known_variable_names = \
                variable_names & dataset.data_variable_names()
            assert len(known_variable_names) > 0  # See updateMessages.
            unknown_variable_names = variable_names - known_variable_names

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

            mds.netcdf.copy(dataset, known_variable_names, output_filename,
                extent, dimension_records, value_selection_method,
                history_message)
        except __HOLE__, exception:
            # Handle errors not detected by updateMessages.
            messages.addErrorMessage(str(exception))
            raise arcpy.ExecuteError
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/tools/opendap_to_netcdf.py/OPeNDAPtoNetCDF.execute