crt1d ===== .. py:module:: crt1d .. autoapi-nested-parse:: 1-D canopy radiative transfer Submodules ---------- .. toctree:: :maxdepth: 1 /api/crt1d/cases/index /api/crt1d/data/index /api/crt1d/diagnostics/index /api/crt1d/leaf_angle/index /api/crt1d/leaf_area/index /api/crt1d/model/index /api/crt1d/solvers/index /api/crt1d/spectra/index /api/crt1d/utils/index /api/crt1d/variables/index Classes ------- .. autoapisummary:: crt1d.Model Functions --------- .. autoapisummary:: crt1d.print_config Package Contents ---------------- .. py:class:: Model(scheme='2s', nlayers=60, **p_kwargs) A general class for testing 1-D canopy radiative transfer schemes. Create a model instance based on the default setup. :param scheme: Identifier for the desired canopy radiative transfer scheme. :type scheme: :class:`str` :param psi: Solar zenith angle (radians). :type psi: :class:`float` :param nlayers: Number of in-canopy layers to use in the solver (interface levels). :type nlayers: :class:`int` :param \*\*p_kwargs: Model parameter keyword arguments passed on to :meth:`update_p()`. .. py:method:: assign_scheme(scheme_name, *, verbose=False) Using the :const:`~crt1d.solvers.AVAILABLE_SCHEMES` dict, assign scheme and necessary scheme attrs. .. py:method:: calc_absorption() Calculate layerwise absorption variables. .. py:method:: copy_p() Return a copy of the parameters dict. .. py:method:: plot_canopy() Plot LAI and LAD profiles. .. py:method:: plot_leafsoil_spectra() Plot the leaf and soil optical properties spectra used by the model. .. py:method:: plot_toc_spectra() Plot the toc (top-of-canopy) irradiance spectra used for the upper boundary condition. .. py:method:: print_p() Pretty print the parameters. .. py:method:: run(**extra_solver_kwargs) TODO: could add verbose option .. py:method:: to_xr(*, info='') Construct and return an :class:`xarray.Dataset`. :param info: Extra information about the run/model to be stored in the dataset. :type info: :class:`str` .. py:method:: update_p(**kwargs) Update parameters, if the validation passes. :param `**kwargs`: Used to update the model parameters. .. py:method:: update_spectra(ds) Update irradiance and leaf/soil optical property spectra from :class:`xarray.Dataset` `ds`. .. py:attribute:: absorption :value: None Absorption outputs calculated from the standard outputs :attr:`out`. .. py:property:: cd Canopy description. .. py:attribute:: out Scheme standard outputs. .. py:property:: out_all Standard and extra outputs. .. py:attribute:: out_extra Scheme extra outputs, such as absorption. Only some schemes provide any. .. py:property:: p Model parameters are indended to be read only (updated with :meth:`update_p`). Invoking this just prints a message. .. py:attribute:: p_default Default parameter settings dict. .. py:attribute:: required_input_keys Required model inputs. .. py:function:: print_config() Print info about the schemes etc.