PerturbProfile¶
- class konrad.humidity.relative_humidity.PerturbProfile(*args, **kwargs)[source]¶
Wrapper to add a perturbation to a Relative Humidity profile.
- __init__(base_profile=<VerticallyUniform() object at 140136009683344>, shape='square', center_plev=50000.0, width=5000.0, intensity=0.1, fixed_T=False)[source]
- Parameters
base_profile (konrad.relative_humidity model) – initial profile on which we will add the perturbation.
shape (str) – name of the shape of the perturbation. Implemented : “square”, “gaussian”. For a Dirac use a square with width 0.
center_plev (float) – Pressure of the center of the square perturbation in [Pa].
width (float) – width of the perturbation in [Pa].
intensity (float) – Change in RH where the profile is perturbed, positive or negative.
Fixed_T (boolean) – If set to true, the temperature at center_plev at the first step is kept as the central point for the perturbation throughout the simulation, and the pressure at the center of the perturbation is no longer constant.
Methods
__init__
([base_profile, shape, center_plev, ...])- param base_profile
initial profile on which we will add the perturbation.
create_variable
(name[, data, dims])Create a variable in the model component.
from_netcdf
(ncfile[, timestep])Load a model component from a netCDF file.
get
(variable[, default, keepdims])Get values of a given variable.
Create a hash from all hashable component attributes.
set
(variable, value)Set the values of a variable.
Convert model component into an xarray.Dataset.
Attributes
attrs
Dictionary containing all attributes.
data_vars
Dictionary containing all data variables and their dimensions.
netcdf_subgroups
Define subgroups used when storing to netCDF file.