Class TCustomModflowWriter

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCustomModflowWriter = class(TCustomFileWriter)

Description

TCustomModflowWriter is an abstract base class used as an ancestor for classes that write MODFLOW input files.

Hierarchy

Overview

Fields

Protected FArrayWritingFormat: TArrayWritingFormat;

Methods

Private procedure WriteHeader(const DataArray: TDataArray; const ArrayName: string);
Private function CheckArrayUniform(const LayerIndex: Integer; const DataArray: TDataArray): boolean;
Private procedure WriteArrayValues(const LayerIndex: Integer; const DataArray: TDataArray);
Protected function PackageID_Comment(APackage: TModflowPackageSelection): string; virtual;
Protected class function FileName(const AFileName: string): string;
Protected class function Extension: string; virtual; abstract;
Protected procedure WriteCommentLines(const Lines: TStrings);
Protected function IPRN_Integer: integer;
Protected function IPRN_Mt3dms_Integer: integer;
Protected function IPRN_Real: integer;
Protected function IPRN_Mt3dms_Real: integer;
Protected procedure GetFlowUnitNumber(var UnitNumber: Integer);
Protected procedure WriteTransient2DArray(const Comment: string; DataTypeIndex: Integer; DataType: TRbwDataType; DefaultValue: Double; List: TList; AssignmentMethod: TUpdateMethod; AdjustForLGR: boolean; var TransientArray: TDataArray; FreeArray: boolean = True);
Public procedure CheckArray(const DataArray: TDataArray; const LayerIndex: integer; const ErrorOrWarningMessage: string; CheckMethod: TCheckValueMethod; CheckValue: double; ErrorType: TErrorType);
Public Constructor Create(AModel: TCustomModel; EvaluationType: TEvaluationType); override;
Public procedure WriteArray(const DataArray: TDataArray; const LayerIndex: integer; const ArrayName: string; CacheArray: Boolean = True);
Public procedure WriteConstantU2DINT(const Comment: string; const Value: integer);
Public procedure WriteConstantU2DREL(const Comment: string; const Value: double);
Public procedure WriteCrossSectionArray(const DataArray: TDataArray; const ArrayName: string);
Public procedure WriteIface(const Value: TIface);
Public Procedure WriteU2DINTHeader(const Comment: string); virtual;
Public Procedure WriteU2DRELHeader(const Comment: string);
Public class procedure WriteToNameFile(const Ftype: string; const UnitNumber: integer; FileName: string; const Option: TFileOption; RelativeFileName: boolean = False);
Public class procedure WriteToMt3dMsNameFile(const Ftype: string; const UnitNumber: integer; FileName: string; RelativeFileName: boolean = False);
Public class procedure AddNameFileComment(const Comment: string);

Properties

Public property ArrayWritingFormat: TArrayWritingFormat read FArrayWritingFormat;

Description

Fields

Protected FArrayWritingFormat: TArrayWritingFormat;
 

Methods

Private procedure WriteHeader(const DataArray: TDataArray; const ArrayName: string);

WriteHeader writes a header for DataArray using either WriteConstantU2DINT or WriteU2DRELHeader.

Private function CheckArrayUniform(const LayerIndex: Integer; const DataArray: TDataArray): boolean;
 
Private procedure WriteArrayValues(const LayerIndex: Integer; const DataArray: TDataArray);
 
Protected function PackageID_Comment(APackage: TModflowPackageSelection): string; virtual;

PackageID_Comment generates a comment line for a MODFLOW input file indentifying the package.

Protected class function FileName(const AFileName: string): string;

FileName converts AFileName to use the correct extension for the file.

Protected class function Extension: string; virtual; abstract;

Extension returns the extension (including the initial period) for the MODFLOW input file to be exported.

Protected procedure WriteCommentLines(const Lines: TStrings);

WriteCommentLines writes Lines as comments.

Protected function IPRN_Integer: integer;

IPRN_Integer returns the proper IPRN for specifying whether to print an integer input array

Protected function IPRN_Mt3dms_Integer: integer;
 
Protected function IPRN_Real: integer;

IPRN_Real returns the proper IPRN for specifying whether to print an real number input array

Protected function IPRN_Mt3dms_Real: integer;
 
Protected procedure GetFlowUnitNumber(var UnitNumber: Integer);

GetFlowUnitNumber retrieves the proper unit number for the cell-by-cell flow file.

Protected procedure WriteTransient2DArray(const Comment: string; DataTypeIndex: Integer; DataType: TRbwDataType; DefaultValue: Double; List: TList; AssignmentMethod: TUpdateMethod; AdjustForLGR: boolean; var TransientArray: TDataArray; FreeArray: boolean = True);

WriteTransient2DArray writes a U2DREL array based on the contents of List. List is sometimes a TValueCellList or a list of list of TValueCellList or a TList. DataTypeIndex indicates which parameter of the TValueCell to use. DataType indicates what sort of information in the TList. DefaultValue indicates the proper default parameter for the gridded data. If FreeArray is True, TransientArray will be set to nil. If FreeArray is False, TransientArray will be set to the TDataArray that was exported and it will be the caller's responsibility to free TransientArray

Public procedure CheckArray(const DataArray: TDataArray; const LayerIndex: integer; const ErrorOrWarningMessage: string; CheckMethod: TCheckValueMethod; CheckValue: double; ErrorType: TErrorType);

CheckArray checks that the values stored in DataArray are valid.)

Parameters
DataArray
is the TDataArray to be checked.
LayerIndex
is the layer (first index) in DataArray to be checked.
ErrorOrWarningMessage
is the message to be displayed to the user if the check fails.
CheckMethod
indicates how the data in DataArray will be checked.
CheckValue
is the value against which the data in DataArray will be checked.
ErrorType
indicates whether problems discovered in CheckArray should be considered errors or warnings.
Public Constructor Create(AModel: TCustomModel; EvaluationType: TEvaluationType); override;

Create creates and instance of TCustomModflowWriter.

Parameters
Model
is the TCustomModel to be exported.
Public procedure WriteArray(const DataArray: TDataArray; const LayerIndex: integer; const ArrayName: string; CacheArray: Boolean = True);

WriteArray writes one layer of DataArray to the output file.

Parameters
DataArray
is the TDataArray to be written.
LayerIndex
is the layer in DataArray to be written.
ArrayName
is written as a comment identifying the data set being written.
Public procedure WriteConstantU2DINT(const Comment: string; const Value: integer);

WriteConstantU2DINT writes value to the output file using the U2DINT format in MODFLOW or the IARRAY array reader in MT3DMS depending on the value of FArrayWritingFormat for cases when the array is a constant.

Public procedure WriteConstantU2DREL(const Comment: string; const Value: double);

WriteConstantU2DREL writes value to the output file using the U2DREL format in MODFLOW or the RARRAY array reader in MT3DMS depending on the value of FArrayWritingFormat for cases when the array is a constant.

Public procedure WriteCrossSectionArray(const DataArray: TDataArray; const ArrayName: string);

WriteCrossSectionArray writes DataArray in cross section format.

Public procedure WriteIface(const Value: TIface);

WriteIface writes the IFACE parameter in MODFLOW.

Public Procedure WriteU2DINTHeader(const Comment: string); virtual;

WriteU2DINTHeader writes the header for the U2DINT array reader in MODFLOW or the IARRAY array reader in MT3DMS depending on the value of FArrayWritingFormat.

Parameters
Comment
is used to identify the array being written.
Public Procedure WriteU2DRELHeader(const Comment: string);

WriteU2DRELHeader writes the header for the U2DINT array reader in MODFLOW or the RARRAY array reader in MT3DMS depending on the value of FArrayWritingFormat.

Parameters
Comment
is used to identify the array being written.
Public class procedure WriteToNameFile(const Ftype: string; const UnitNumber: integer; FileName: string; const Option: TFileOption; RelativeFileName: boolean = False);

WriteToNameFile writes a line to the name file.

Public class procedure WriteToMt3dMsNameFile(const Ftype: string; const UnitNumber: integer; FileName: string; RelativeFileName: boolean = False);
 
Public class procedure AddNameFileComment(const Comment: string);

AddNameFileComment adds a comment line to the name file.

Properties

Public property ArrayWritingFormat: TArrayWritingFormat read FArrayWritingFormat;

ArrayWritingFormat converts a real number represented as a string to always use


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:29