pinnicle.modeldata
pinnicle.modeldata.data module
- class pinnicle.modeldata.data.Data(parameters=<pinnicle.parameter.DataParameter object>)[source]
Bases:
Constantsclass of data with all data used
- class pinnicle.modeldata.data.DataBase(parameters=<pinnicle.parameter.SingleDataParameter object>)[source]
Bases:
ABCBase class of data
- abstractmethod load_data(domain, physics)[source]
load data from self.parameters.data_path, within the given domain and physics
- subclasses = {'ISSM': <class 'pinnicle.modeldata.issm_data.ISSMmdData'>, 'ISSM Light': <class 'pinnicle.modeldata.issm_light.ISSMLightData'>, 'h5': <class 'pinnicle.modeldata.h5_data.H5Data'>, 'mat': <class 'pinnicle.modeldata.general_mat_data.MatData'>, 'nc': <class 'pinnicle.modeldata.netcdf_data.NetCDFData'>}
pinnicle.modeldata.general_mat_data module
- class pinnicle.modeldata.general_mat_data.MatData(parameters=<pinnicle.parameter.SingleDataParameter object>)[source]
-
data loaded from a .mat file
- get_ice_coordinates(mask_name='')[source]
stack the coordinates x and y, assuming all the data in .mat are in the ice covered region. This function is currently only called by plotting to generate ice covered region.
- load_data(domain=None, physics=None)[source]
load scatter data from a .mat file, return a dict with the required data
pinnicle.modeldata.h5_data module
- class pinnicle.modeldata.h5_data.H5Data(parameters=<pinnicle.parameter.SingleDataParameter object>)[source]
-
data loaded from a .h5 file
- get_ice_coordinates(mask_name='')[source]
stack the coordinates x and y, assuming all the data in .mat are in the ice covered region. This function is currently only called by plotting to generate ice covered region.
- load_data(domain=None, physics=None)[source]
load grid data from a .h5 file, based on the domain, return a dict with the required data
pinnicle.modeldata.issm_data module
- class pinnicle.modeldata.issm_data.ISSMmdData(parameters=<pinnicle.parameter.SingleDataParameter object>)[source]
-
data loaded from model in ISSM
- get_ice_coordinates(mask_name='')[source]
Use get_ice_indices defined by each individual class, get the coordinates (x,y) of ice covered region from X_dict. This function is currently only called by plotting to generate ice covered region.
- get_ice_indices(mask_name='')[source]
get the indices of ice covered region for X_dict and data_dict
- plot(data_names=[], vranges={}, axs=None, resolution=200, **kwargs)[source]
use utils.plot_dict_data to plot the ISSM data
- Parameters:
data_names (list) – Names of the variables. if not specified, plot all variables in data_dict
vranges (dict) – range of the data
axs (array of AxesSubplot) – axes to plot each data, if not given, then generate a subplot according to the size of data_names
resolution (int) – number of pixels in horizontal and vertical direction
- Returns:
x-coordinates of the 2D plot Y (np.array): y-coordinates of the 2D plot im_data (dict): Dict of data for the 2D plot, each element has the same size as X and Y axs (array of AxesSubplot): axes of the subplots
- Return type:
X (np.array)
pinnicle.modeldata.issm_light module
- class pinnicle.modeldata.issm_light.ISSMLightData(parameters=<pinnicle.parameter.SingleDataParameter object>)[source]
-
Data loader for the model from ISSM A light version, does not contain mesh and boundary info, so that one can use the bbox of a domain to select the data only inside
- get_ice_coordinates(mask_name='')[source]
Use get_ice_indices defined by each individual class, get the coordinates (x,y) of ice covered region from X_dict. This function is currently only called by plotting to generate ice covered region.
- get_ice_indices(mask_name='')[source]
get the indices of ice covered region for X_dict and data_dict
- plot(data_names=[], vranges={}, axs=None, resolution=200, **kwargs)[source]
use utils.plot_dict_data to plot the ISSM data
- Parameters:
data_names (list) – Names of the variables. if not specified, plot all variables in data_dict
vranges (dict) – range of the data
axs (array of AxesSubplot) – axes to plot each data, if not given, then generate a subplot according to the size of data_names
resolution (int) – number of pixels in horizontal and vertical direction
- Returns:
x-coordinates of the 2D plot Y (np.array): y-coordinates of the 2D plot im_data (dict): Dict of data for the 2D plot, each element has the same size as X and Y axs (array of AxesSubplot): axes of the subplots
- Return type:
X (np.array)
pinnicle.modeldata.netcdf_data module
- class pinnicle.modeldata.netcdf_data.NetCDFData(parameters=<pinnicle.parameter.SingleDataParameter object>)[source]
-
data loaded from a .nc file
- get_ice_coordinates(mask=None)[source]
stack the coordinates x and y, assuming all the data in .mat are in the ice covered region. This function is currently only called by plotting to generate ice covered region.
- load_data(domain=None, physics=None)[source]
load grid data from a .nc file, based on the domain, return a dict with the required data