postprocess_data.options.options_reader module

class postprocess_data.options.options_reader.OptionsReader(config_file)

Bases: object

A class to read and store configuration options from an INI file.

model_type

Type of model run (NEMO/FVCOM).

Type:

str

model_path

Path to the model files.

Type:

str

output_path

Path to save the output files.

Type:

str

mask_path

Path to the mask file.

Type:

str

phys_files

List of physical file patterns.

Type:

list

bio_files

List of biological file patterns.

Type:

list

time_unit

Time unit for interpolation (‘month’ or ‘day’).

Type:

str

save_option

Option for saving the processed data.

Type:

str

surface_vars

Variables for surface data.

Type:

dict

integrated_vars

Variables for integrated data.

Type:

dict

bottom_vars

Variables for bottom data.

Type:

dict

mapping

Mapping of variable names.

Type:

dict

get_variable_name(var)

Get the mapped name for a variable if it exists, otherwise return the original name.

Parameters:

var (str) – The original variable name.

Returns:

The mapped variable name or the original name if no mapping exists.

Return type:

str

write_to_file(output_file)

Write the current options to a configuration file.

Parameters:

output_file (str) – Path to the output configuration file.