src.spyice.postprocess.visualise_model#

class src.spyice.postprocess.visualise_model.VisualiseModel[source]#

Bases: object

A class for visualizing sea ice model results.

Parameters:
  • user_input_dataclass (UserInput) – An instance of the UserInput class containing user input data.

  • results_dataclass (ResultsParams) – An instance of the ResultsParams class containing results data.

  • error_analysis_dataclass (Analysis) – An instance of the Analysis class containing error analysis data.

__init__(user_input_dataclass, results_dataclass, error_analysis_dataclass)[source]#
Parameters:
  • user_input_dataclass (UserInput) – An instance of the UserInput class containing user input data.

  • results_dataclass (ResultsParams) – An instance of the ResultsParams class containing results data.

  • error_analysis_dataclass (Analysis) – An instance of the Analysis class containing error analysis data.

Return type:

None

create_2d_array(data)[source]#
phi_slope(iteration)[source]#

Calculates the indices of the mushy regions based on the phi values.

Parameters:

iteration (int) – The iteration number.

Returns:

The indices of the mushy regions.

Return type:

numpy.ndarray

plot_H_iter(h, t, s=None, param_name='Temperature', unit='K', savefig=False)[source]#
plot_H_iter_all(savefig=False)[source]#
plot_H_iter_heatmap(h, p, temp_all, d, t, param_name='Temperature', unit='K', savefig=False)[source]#
plot_H_iter_heatmap_mushy(h, p, temp_all, t, param_name='Temperature', unit='K', savefig=False)[source]#
plot_all_phi_mush(phi_mush, t, savefig=False)[source]#
plot_brinevelocity_profile(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:

savefig (bool)

plot_carbon_concentration(savefig=True)[source]#
Parameters:

savefig (bool)

plot_carbon_concentration_multiplelayers(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:
  • savefig (bool)

  • show (bool)

plot_carbon_concentration_profile(savefig=True, show=False)[source]#
Parameters:
  • savefig (bool)

  • show (bool)

plot_carbon_heatmap_as_gif()[source]#
plot_chla_bulk_concentration(savefig=True)[source]#
Parameters:

savefig (bool)

plot_chla_bulk_concentration_multiplelayers(savefig=True)[source]#
Parameters:

savefig (bool)

plot_depth_over_time(savefig=False, show=False)[source]#

Plots the depth over time.

Parameters:

savefig (bool, optional) – Whether to save the figure. Defaults to False.

plot_depth_over_time_heatmap(savefig=False)[source]#

Plots the depth over time.

Parameters:

savefig (bool, optional) – Whether to save the figure. Defaults to False.

plot_error_temp(zoom_x, norm='inf', savefig=True)[source]#

Plots the temperature errors using the specified norm.

Parameters:
  • zoom_x (int) – The maximum value for the x-axis.

  • norm (str, optional) – The norm to be used for plotting. Defaults to “inf”.

  • savefig (bool, optional) – Whether to save the figure. Defaults to True.

plot_error_temp_diff(zoom_x, savefig='True')[source]#

Plots the temperature differences between two consecutive iterations.

Parameters:
  • zoom_x (int) – The maximum value for the x-axis.

  • savefig (str, optional) – Indicates whether to save the figure or not. Defaults to “True”.

plot_liquid_fraction_profile(savefig=True)[source]#
Parameters:

savefig (bool)

plot_liquid_salinity_profile(savefig=True)[source]#
Parameters:

savefig (bool)

plot_liquidfraction_heatmap(savefig=True, show=False, ax=None, fig=None)[source]#

Plots the Liquidfraction heatmap.

Parameters:

savefig (bool)

plot_nutrient_cn_profile(savefig=True)[source]#
Parameters:

savefig (bool)

plot_nutrient_concentration(savefig=True)[source]#
Parameters:

savefig (bool)

plot_nutrient_concentration_heatmap_as_gif()[source]#
plot_nutrient_concentration_multiplelayers(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:
  • savefig (bool)

  • show (bool)

plot_photosynthetic_rate(savefig=True)[source]#
Parameters:

savefig (bool)

plot_photosynthetic_rate_multiplelayers(savefig=True)[source]#
Parameters:

savefig (bool)

plot_radiation_algae(savefig=True)[source]#
Parameters:

savefig (bool)

plot_radiation_algae_dt_by_rho_c(savefig=True)[source]#
Parameters:

savefig (bool)

plot_radiation_algae_multiplelayers(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:
  • savefig (bool)

  • show (bool)

plot_radiation_all(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:

savefig (bool)

plot_radiation_profile(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:

savefig (bool)

plot_response_pt1_pt2(tempmushPT1, tempmushPT2, savefig=False)[source]#
plot_salinity_heatmap(savefig=True, show=False, ax=None, fig=None)[source]#

Plots the Salinity heatmap.

Parameters:
  • savefig (bool)

  • show (bool)

plot_salinity_heatmap_as_gif()[source]#
plot_salinity_profile(savefig=True)[source]#
Parameters:

savefig (bool)

plot_salinity_sourceterm_profile(savefig=True, show=False, ax=None, fig=None)[source]#
Parameters:

savefig (bool)

plot_temperature(z_depth, savefig=True, Buffo_matlab=False)[source]#

Plots the temperature evolution at a given depth.

Parameters:
  • z_depth (float) – The depth at which to plot the temperature evolution.

  • savefig (bool, optional) – Whether to save the figure. Defaults to True.

  • Buffo_matlab (bool, optional) – Whether to include Buffo-matlab data in the plot. Defaults to False.

plot_temperature_3D(savefig=True)[source]#
Parameters:

savefig (bool)

plot_temperature_3d_contours(savefig=True)[source]#
plot_temperature_heatmap(savefig=True, export_csv=False, show=False, ax=None, fig=None)[source]#

Plots the temperature heatmap.

Parameters:
  • savefig (bool)

  • show (bool)

plot_temperature_heatmap_as_gif()[source]#
plot_temperature_liquid_solid_evolution(z_depth, savefig=False)[source]#

Plots the temperature evolution at a given depth.

Parameters:
  • z_depth (float) – The depth at which to plot the temperature evolution.

  • savefig (bool, optional) – Whether to save the figure. Defaults to True.

  • Buffo_matlab (bool, optional) – Whether to include Buffo-matlab data in the plot. Defaults to False.

plot_temperature_profile(savefig=True)[source]#
Parameters:

savefig (bool)