am.model ======== .. py:module:: am.model Classes ------- .. autoapisummary:: am.model.Model Module Contents --------------- .. py:class:: Model(path, args) An am atmospheric model loaded from an ``.amc`` configuration file. Thin wrapper around the Rust ``_Model`` that returns xarray Datasets for :attr:`outputs` and :meth:`jacobian`. Parameters ---------- path: Path to the ``.amc`` file. args: Positional substitution values for ``%1``, ``%2``, … placeholders in the config (frequency grid, zenith angle, PWV scale, etc.). .. py:method:: compute() Run the radiative transfer computation. .. py:property:: frequency :type: numpy.ndarray Frequency grid in GHz. .. py:property:: outputs :type: xarray.Dataset Computed output spectra as an xarray Dataset. Dimension is ``frequency`` (GHz). Only outputs listed in the ``output`` directive of the ``.amc`` file are present. Empty before :meth:`compute` is called. .. py:property:: variables :type: list[str] Names of fit/differentiation variables defined in the config. .. py:property:: n_variables :type: int Number of fit/differentiation variables. .. py:method:: jacobian() -> xarray.Dataset Compute Jacobians of all outputs w.r.t. fit variables. Returns an xarray Dataset with dimensions ``(variable, frequency)``. The ``.amc`` config must define fit variables (parameters with scales). Raises ------ ConfigError If no fit variables are defined in the ``.amc`` config. .. py:method:: summary() -> str Full resolved model configuration summary.