### Import SASKTRAN2 Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Imports the SASKTRAN2 library, aliasing it as 'sk' for convenience. This is the initial step for any SASKTRAN2 operation. ```python import sasktran2 as sk ``` -------------------------------- ### Initialize sasktran2 Engine Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Initializes the sasktran2 Engine object with configuration and geometry. This step calculates and caches all geometry information. ```python engine = sk.Engine(config, model_geometry, viewing_geo) ``` -------------------------------- ### Basic SASKTRAN2 Configuration Source: https://sasktran2.readthedocs.io/en/latest/users_guide/performance This snippet demonstrates the basic setup for using the SASKTRAN2 library by importing the package and initializing a configuration object. It serves as a starting point for performance-related tasks. ```python import sasktran2 as sk config = sk.Config() ``` -------------------------------- ### Test SASKTRAN2 with Pixi Source: https://sasktran2.readthedocs.io/en/latest/_sources/developer/compiling Runs the provided tests to verify the SASKTRAN2 development environment setup. This ensures the installation and compilation were successful. ```shell pixi run test ``` -------------------------------- ### Print and Plot sasktran2 Output Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Demonstrates how to print the calculated output, which is usually an xarray.Dataset, and how to plot specific fields like 'radiance'. ```python print(output) ``` ```python output['radiance'].isel(los=0).plot() ``` -------------------------------- ### Configure SASKTRAN2 Calculation Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Initializes and configures the SASKTRAN2 calculation settings. This includes setting up scattering sources and adjusting accuracy parameters like the number of streams. ```python config = sk.Config() config.multiple_scatter_source = sk.MultipleScatterSource.DiscreteOrdinates config.num_streams = 2 ``` -------------------------------- ### Install and Run Pre-commit Hooks Source: https://sasktran2.readthedocs.io/en/latest/developer/contributing Instructions for installing the pre-commit tool and running its hooks manually to format and check code. This ensures code quality and consistency across the project. ```shell pip install pre-commit ``` ```shell pre-commit run -a ``` ```shell pre-commit install ``` -------------------------------- ### Install Dependencies with Pixi Source: https://sasktran2.readthedocs.io/en/latest/_sources/developer/compiling Installs the necessary dependencies for SASKTRAN2 development using the pixi package manager. This command sets up the required environment on any platform. ```shell pixi install ``` -------------------------------- ### Install SASKTRAN2 via pip Source: https://sasktran2.readthedocs.io/en/latest/installation Installs the SASKTRAN2 library using the pip package manager. This is the recommended installation method. ```shell pip install sasktran2 ``` -------------------------------- ### SASKTRAN2 Examples - Using Constituents Source: https://sasktran2.readthedocs.io/en/latest/examples/examples Example demonstrating the inclusion of basic aerosols in SASKTRAN2. ```APIDOC aerosol/basic.html: Description: Demonstrates basic aerosol inclusion in SASKTRAN2. ``` -------------------------------- ### Activate Environment and Install Package Source: https://sasktran2.readthedocs.io/en/latest/_sources/developer/codespaces Activates the development environment using micromamba and installs the SASKTRAN2 package in editable mode. This command needs to be re-run after C++ code changes. ```shell micromamba activate sasktran2-dev-env pip install -e . ``` -------------------------------- ### SASKTRAN2 Examples - Calculating Derivatives Source: https://sasktran2.readthedocs.io/en/latest/examples/examples Example demonstrating the calculation of derivatives, specifically Air Mass Factors. ```APIDOC wf/amf.html: Description: Example for calculating Air Mass Factors (AMF) in SASKTRAN2. ``` -------------------------------- ### SASKTRAN2: Setup and Atmosphere Configuration Source: https://sasktran2.readthedocs.io/en/latest/weighting_functions Demonstrates the initialization of SASKTRAN2 components including geometry, viewing, atmosphere, and engine. It shows how to define atmospheric constituents and load standard atmospheric models. ```Python import sasktran2 as sk import numpy as np config = sk.Config() model_geometry = sk.Geometry1D(cos_sza=0.6, solar_azimuth=0, earth_radius_m=6372000, altitude_grid_m=np.arange(0, 65001, 1000), interpolation_method=sk.InterpolationMethod.LinearInterpolation, geometry_type=sk.GeometryType.Spherical) viewing_geo = sk.ViewingGeometry() for alt in [10000, 20000, 30000, 40000]: ray = sk.TangentAltitudeSolar(tangent_altitude_m=alt, relative_azimuth=0, observer_altitude_m=200000, cos_sza=0.6) viewing_geo.add_ray(ray) wavel = np.arange(280.0, 800.0, 0.1) atmosphere = sk.Atmosphere(model_geometry, config, wavelengths_nm=wavel) sk.climatology.us76.add_us76_standard_atmosphere(atmosphere) atmosphere['rayleigh'] = sk.constituent.Rayleigh() atmosphere['ozone'] = sk.climatology.mipas.constituent("O3", sk.optical.O3DBM()) atmosphere['no2'] = sk.climatology.mipas.constituent("NO2", sk.optical.NO2Vandaele()) engine = sk.Engine(config, model_geometry, viewing_geo) ``` -------------------------------- ### Build and View Documentation Source: https://sasktran2.readthedocs.io/en/latest/_sources/developer/codespaces Builds the SASKTRAN2 documentation using Sphinx and the Makefile, then opens the generated HTML index file in a preview. Requires the 'Live Preview' VS Code extension. ```shell cd docs/sphinx make html ``` ```shell Explorer -> docs/sphinx/build -> index.html -> Right Click -> Show Preview Navigate to docs/sphinx/build in the preview window. ``` -------------------------------- ### Calculate Radiance with sasktran2 Engine Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Performs the radiative transfer calculation by passing an Atmosphere object to the engine's calculate_radiance method. The output is typically an xarray.Dataset. ```python output = engine.calculate_radiance(atmosphere) ``` -------------------------------- ### Setting up SASKTRAN-2 Calculations Source: https://sasktran2.readthedocs.io/en/latest/required_components Guides on configuring SASKTRAN-2 simulations, including model geometry, viewing directions, atmospheric sources, and atmospheric state parameters. ```APIDOC Calculation Setup Guide: 1. Model Geometry Configuration: - Description: Define global model grids (e.g., altitude) and the overall geometry type (spherical, plane-parallel). - Related Components: components/model_geometry.html 2. Viewing Geometry Specification: - Description: Set up viewing directions for radiance output. - Related Components: components/viewing_geometry.html 3. Atmospheric Sources Selection: - Description: Determine which source terms to include in the calculation (e.g., multiple scattering, thermal sources). - Related Components: components/sources.html 4. Atmospheric State Definition: - Description: Configure atmospheric constituents, such as Rayleigh scattering and ozone absorption. - Related Components: components/atmosphere.html ``` -------------------------------- ### Build and View Documentation Source: https://sasktran2.readthedocs.io/en/latest/developer/codespaces Commands to build the Sphinx HTML documentation and instructions on how to preview it within VS Code using the Live Preview extension. ```shell cd docs/sphinx make html ``` -------------------------------- ### Define Viewing Geometry Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Creates a ViewingGeometry object to specify the radiance output conditions. This involves adding individual viewing rays, such as tangent altitude rays for limb viewing. ```python viewing_geo = sk.ViewingGeometry() for alt in [10000, 20000, 30000, 40000]: ray = sk.TangentAltitudeSolar(tangent_altitude_m=alt, relative_azimuth=0, observer_altitude_m=200000, cos_sza=0.6) viewing_geo.add_ray(ray) ``` -------------------------------- ### SASKTRAN2 Configuration Initialization Source: https://sasktran2.readthedocs.io/en/latest/components/sources Demonstrates how to import the sasktran2 library and initialize the configuration object, which is central to setting up various model parameters including source terms. ```python import sasktran2 as sk config = sk.Config() ``` -------------------------------- ### Add Standard Atmosphere Climatology Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Applies a standard atmosphere model, such as the US Standard Atmosphere (US76), to the Atmosphere object. This populates pressure and temperature profiles, which are often required for calculating constituent properties. ```python sk.climatology.us76.add_us76_standard_atmosphere(atmosphere) ``` -------------------------------- ### Define Atmospheric State Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Constructs the Atmosphere object, which defines the atmospheric state for the calculation. This includes specifying wavelengths and adding atmospheric constituents like Rayleigh scattering and absorption due to ozone and nitrogen dioxide. ```python import numpy as np wavel = np.arange(280.0, 800.0, 0.1) atmosphere = sk.Atmosphere(model_geometry, config, wavelengths_nm=wavel) atmosphere['rayleigh'] = sk.constituent.Rayleigh() atmosphere['ozone'] = sk.climatology.mipas.constituent("O3", sk.optical.O3DBM()) atmosphere['no2'] = sk.climatology.mipas.constituent("NO2", sk.optical.NO2Vandaele()) ``` -------------------------------- ### Define 1D Model Geometry Source: https://sasktran2.readthedocs.io/en/latest/_sources/quickstart Sets up the model geometry for the radiative transfer calculation, specifying parameters like solar zenith angle, solar azimuth, Earth radius, altitude grid, and interpolation method for a spherical geometry. ```python import numpy as np model_geometry = sk.Geometry1D(cos_sza=0.6, solar_azimuth=0, earth_radius_m=6372000, altitude_grid_m=np.arange(0, 65001, 1000), interpolation_method=sk.InterpolationMethod.LinearInterpolation, geometry_type=sk.GeometryType.Spherical) ``` -------------------------------- ### Sasktran2 API Reference - Config Source: https://sasktran2.readthedocs.io/en/latest/examples/examples References the configuration module for Sasktran2, likely containing classes and functions for setting up simulation parameters. ```APIDOC sasktran2.Config: Description: Module for configuration settings in Sasktran2. Methods/Classes: - Likely includes classes or functions to manage simulation parameters, atmospheric profiles, sensor configurations, etc. ``` -------------------------------- ### Install SASKTRAN2 via conda Source: https://sasktran2.readthedocs.io/en/latest/installation Installs the SASKTRAN2 library using the conda package manager from the conda-forge channel. ```shell conda install conda-forge::sasktran2 ``` -------------------------------- ### Pixi Development Commands Source: https://sasktran2.readthedocs.io/en/latest/developer/compiling Commands for setting up, building, and testing the SASKTRAN2 project using the pixi package manager. These commands facilitate environment creation, project compilation, and verification through tests. ```shell pixi install ``` ```shell pixi run build ``` ```shell pixi run test ``` -------------------------------- ### Sasktran2 Core API Reference Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/constituent/brdf/kokhanovsky Documentation for core Sasktran2 components including configuration, engine, geometry, and atmosphere handling. ```APIDOC sasktran2.Config: Description: Configuration management for Sasktran2 simulations. sasktran2.Engine: Description: The main simulation engine for running radiative transfer calculations. sasktran2.Geometry1D: Description: Represents one-dimensional model geometry, typically atmospheric layers. sasktran2.Atmosphere: Description: Defines the atmospheric state, including composition and vertical profiles. ``` -------------------------------- ### WGS84 Example Usage Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/geodetic Example demonstrating the initialization and usage of the WGS84 geodetic object, including setting the frame from a tangent point and printing its location. ```python import sasktran2 as sk geodetic = sk.WGS84() geodetic.from_tangent_point([ 3.676013154788849600e+005, 1.009976313640051500e+006, -6.871601202127538600e+006], [ 2.884568631765662100e-001, 7.925287180643269000e-001, 5.372996083468238900e-001]) print(geodetic) ``` -------------------------------- ### Clone SASKTRAN2 Repository Source: https://sasktran2.readthedocs.io/en/latest/developer/contributing Instructions for cloning the SASKTRAN2 repository from GitHub to your local machine. This is the initial step required before making any contributions to the project. ```shell git clone git@github.com:YOURUSERNAME/sasktran2.git ``` -------------------------------- ### sasktran2 Configuration API Source: https://sasktran2.readthedocs.io/en/latest/components/source_terms/singlescatter API reference for the sasktran2 configuration module, detailing how to set up and manage simulation parameters. ```APIDOC sasktran2.Config: Description: Manages simulation configuration settings. Methods: __init__(...): Initializes the configuration object. load_config(filepath: str): Loads configuration from a file. set_parameter(key: str, value: any): Sets a specific configuration parameter. get_parameter(key: str) -> any: Retrieves a configuration parameter. ``` -------------------------------- ### Sasktran2 Core Modules Source: https://sasktran2.readthedocs.io/en/latest/installation Overview of key modules within the Sasktran2 library, including configuration, engine, geometry, atmosphere, constituents, optical properties, and viewing geometry. ```APIDOC sasktran2.Config: Description: Handles the configuration settings for Sasktran2 calculations. Methods: - __init__(self, ...): Initializes the configuration object. sasktran2.Engine: Description: The main engine for running radiative transfer simulations. Methods: - __init__(self, ...): Initializes the simulation engine. - run_simulation(self, ...): Executes the radiative transfer calculation. sasktran2.Geometry1D: Description: Represents one-dimensional geometry for atmospheric profiles. Methods: - __init__(self, ...): Initializes the 1D geometry. sasktran2.Atmosphere: Description: Defines the atmospheric state, including layers and constituents. Methods: - __init__(self, ...): Initializes the atmosphere object. sasktran2.constituent.Rayleigh: Description: Represents Rayleigh scattering properties. Methods: - __init__(self, ...): Initializes Rayleigh scattering. sasktran2.constituent.VMRAltitudeAbsorber: Description: Defines an absorber with volume mixing ratio dependent on altitude. Methods: - __init__(self, ...): Initializes the VMR absorber. sasktran2.constituent.NumberDensityScatterer: Description: Represents a scatterer defined by number density. Methods: - __init__(self, ...): Initializes the number density scatterer. sasktran2.constituent.ExtinctionScatterer: Description: Represents a scatterer defined by extinction properties. Methods: - __init__(self, ...): Initializes the extinction scatterer. sasktran2.constituent.CollisionInducedAbsorber: Description: Defines collision-induced absorption properties. Methods: - __init__(self, ...): Initializes collision-induced absorption. sasktran2.constituent.LambertianSurface: Description: Represents a Lambertian reflecting surface. Methods: - __init__(self, ...): Initializes the Lambertian surface. sasktran2.constituent.SnowKokhanovsky: Description: Implements snow optical properties using the Kokhanovsky model. Methods: - __init__(self, ...): Initializes snow properties. sasktran2.constituent.MODIS: Description: Integrates MODIS aerosol properties. Methods: - __init__(self, ...): Initializes MODIS aerosol properties. sasktran2.constituent.SolarIrradiance: Description: Represents solar irradiance models. Methods: - __init__(self, ...): Initializes solar irradiance. sasktran2.constituent.ThermalEmission: Description: Defines thermal emission models. Methods: - __init__(self, ...): Initializes thermal emission. sasktran2.constituent.SurfaceThermalEmission: Description: Represents thermal emission from the surface. Methods: - __init__(self, ...): Initializes surface thermal emission. sasktran2.constituent.AirMassFactor: Description: Calculates air mass factors. Methods: - __init__(self, ...): Initializes air mass factor calculation. sasktran2.optical.O3DBM: Description: Optical depth model for Ozone (DBM). Methods: - __init__(self, ...): Initializes O3DBM. sasktran2.optical.NO2Vandaele: Description: Optical properties for NO2 based on Vandaele data. Methods: - __init__(self, ...): Initializes NO2 Vandaele properties. sasktran2.optical.HITRANUV: Description: HITRAN-based absorption cross-sections in the UV range. Methods: - __init__(self, ...): Initializes HITRAN UV absorption. sasktran2.optical.HITRANAbsorber: Description: General HITRAN absorber class. Methods: - __init__(self, ...): Initializes HITRAN absorber. sasktran2.optical.HITRANTabulated: Description: Tabulated HITRAN absorption data. Methods: - __init__(self, ...): Initializes tabulated HITRAN data. sasktran2.optical.HITRANCollision: Description: HITRAN data for collision-induced absorption. Methods: - __init__(self, ...): Initializes HITRAN collision-induced absorption. sasktran2.optical.database.OpticalDatabase: Description: Base class for optical property databases. Methods: - __init__(self, ...): Initializes the optical database. sasktran2.optical.database.OpticalDatabaseGenericAbsorber: Description: Generic absorber for optical databases. Methods: - __init__(self, ...): Initializes generic absorber. sasktran2.optical.database.OpticalDatabaseGenericScatterer: Description: Generic scatterer for optical databases. Methods: - __init__(self, ...): Initializes generic scatterer. sasktran2.optical.Mie: Description: Mie scattering calculations. Methods: - __init__(self, ...): Initializes Mie scattering. sasktran2.optical.rayleigh: Description: Rayleigh scattering calculations. Methods: - __init__(self, ...): Initializes Rayleigh scattering. sasktran2.ViewingGeometry: Description: Defines viewing geometry parameters. Methods: - __init__(self, ...): Initializes viewing geometry. sasktran2.TangentAltitudeSolar: Description: Represents tangent altitude geometry relative to the sun. Methods: - __init__(self, ...): Initializes tangent altitude solar geometry. ``` -------------------------------- ### Activate Environment and Install Package Source: https://sasktran2.readthedocs.io/en/latest/developer/codespaces Activates the development environment using micromamba and installs the project in editable mode. This command is necessary after any changes to the C++ code within the model. ```shell micromamba activate sasktran2-dev-env pip install -e . ``` -------------------------------- ### Sasktran2 API Reference Overview Source: https://sasktran2.readthedocs.io/en/latest/quickstart Provides an overview of the Sasktran2 API, categorizing key components like configuration, engine, geometry, atmosphere, constituents, optical properties, and viewing geometry. This serves as a high-level guide to the library's structure. ```APIDOC Sasktran2 API Reference: This section details the programmatic interface for the Sasktran2 radiative transfer model. Key Modules and Components: 1. **Config**: Handles the configuration settings for Sasktran2 calculations. - `sasktran2.Config`: Main configuration class. 2. **Engine**: The core engine responsible for running radiative transfer simulations. - `sasktran2.Engine`: The primary simulation engine. 3. **Model Geometry**: Defines the geometric setup for the atmospheric model. - `sasktran2.Geometry1D`: Represents a one-dimensional atmospheric geometry. 4. **Atmosphere**: Describes the atmospheric state and its properties. - `sasktran2.Atmosphere`: Class for defining atmospheric profiles. 5. **Constituents**: Represents various atmospheric components and their properties. - `sasktran2.constituent.Rayleigh`: Rayleigh scattering properties. - `sasktran2.constituent.VMRAltitudeAbsorber`: Absorber with volume mixing ratio dependent on altitude. - `sasktran2.constituent.NumberDensityScatterer`: Scatterer defined by number density. - `sasktran2.constituent.ExtinctionScatterer`: Scatterer defined by extinction properties. - `sasktran2.constituent.CollisionInducedAbsorber`: Absorber due to collision-induced absorption. - `sasktran2.constituent.LambertianSurface`: Represents a Lambertian reflecting surface. - `sasktran2.constituent.SnowKokhanovsky`: Snow optical properties using the Kokhanovsky model. - `sasktran2.constituent.MODIS`: Properties derived from MODIS data. - `sasktran2.constituent.SolarIrradiance`: Defines solar irradiance. - `sasktran2.constituent.ThermalEmission`: Defines thermal emission properties. - `sasktran2.constituent.SurfaceThermalEmission`: Defines surface thermal emission. - `sasktran2.constituent.AirMassFactor`: Calculates air mass factors. 6. **Optical Properties**: Defines optical properties like absorption and scattering. - `sasktran2.optical.O3DBM`: Ozone absorption cross-sections from DB M. - `sasktran2.optical.NO2Vandaele`: Nitrogen dioxide cross-sections from Vandaele. - `sasktran2.optical.HITRANUV`: HITRAN data for UV absorbers. - `sasktran2.optical.HITRANAbsorber`: General HITRAN absorber class. - `sasktran2.optical.HITRANTabulated`: Tabulated HITRAN data. - `sasktran2.optical.HITRANCollision`: Collision-induced absorption from HITRAN. - `sasktran2.optical.database.OpticalDatabase`: Base class for optical property databases. - `sasktran2.optical.database.OpticalDatabaseGenericAbsorber`: Generic absorber database. - `sasktran2.optical.database.OpticalDatabaseGenericScatterer`: Generic scatterer database. - `sasktran2.optical.Mie`: Mie scattering calculations. - `sasktran2.optical.rayleigh`: Rayleigh scattering calculations. 7. **Viewing Geometry**: Defines the geometry from which the scene is viewed. - `sasktran2.ViewingGeometry`: General viewing geometry class. - `sasktran2.TangentAltitudeSolar`: Specific viewing geometry related to tangent altitude and solar position. ``` -------------------------------- ### Install pre-commit Hook Manager Source: https://sasktran2.readthedocs.io/en/latest/_sources/developer/contributing Installs the pre-commit framework, a Python package that helps manage and run pre-commit hooks for code formatting and linting. This is a prerequisite for setting up automatic code checks. ```shell pip install pre-commit ``` -------------------------------- ### WGS84 Altitude Intercepts Example Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/geodetic Example demonstrating the calculation of altitude intercepts using the WGS84 geodetic object. It shows how to find intersection points of a line of sight with a specified altitude. ```python import sasktran2 as sk import numpy as np geodetic = sk.WGS84() look = geodetic.from_tangent_altitude(15322, [3.676013154788849600e+005, 1.009976313640051500e+006, -6.871601202127538600e+006], [0, 0, 1]) obs = geodetic.location intercept1, intercept2 = geodetic.altitude_intercepts(16000, obs, look) print(np.array_str(intercept1, precision=3)) print(np.array_str(intercept2, precision=3)) ``` -------------------------------- ### Setup SASKTRAN2 Calculation Environment Source: https://sasktran2.readthedocs.io/en/latest/examples/wf/amf Initializes the SASKTRAN2 configuration, defines the atmospheric geometry, viewing conditions, wavelengths, and atmospheric constituents (Rayleigh, Ozone, NO2). It also sets up the radiative transfer engine. ```Python import sasktran2 as sk import numpy as np import matplotlib.pyplot as plt config = sk.Config() config.multiple_scatter_source = sk.MultipleScatterSource.DiscreteOrdinates model_geometry = sk.Geometry1D( cos_sza=0.6, solar_azimuth=0, earth_radius_m=6372000, altitude_grid_m=np.arange(0, 65001, 1000), interpolation_method=sk.InterpolationMethod.LinearInterpolation, geometry_type=sk.GeometryType.Spherical ) viewing_geo = sk.ViewingGeometry() viewing_geo.add_ray( sk.GroundViewingSolar( cos_sza=0.6, relative_azimuth=0, cos_viewing_zenith=0.8, observer_altitude_m=200000, ) ) wavel = np.array([290, 310, 330, 350, 400, 600]) atmosphere = sk.Atmosphere(model_geometry, config, wavelengths_nm=wavel) atmosphere.surface.albedo[:] = 0.3 sk.climatology.us76.add_us76_standard_atmosphere(atmosphere) atmosphere["rayleigh"] = sk.constituent.Rayleigh() atmosphere['ozone'] = sk.climatology.mipas.constituent("O3", sk.optical.O3DBM()) atmosphere['no2'] = sk.climatology.mipas.constituent("NO2", sk.optical.NO2Vandaele()) engine = sk.Engine(config, model_geometry, viewing_geo) ``` -------------------------------- ### Install pre-commit Hooks Source: https://sasktran2.readthedocs.io/en/latest/_sources/developer/contributing Sets up the Git pre-commit hooks to automatically run formatting and checks on every commit. This is highly recommended to ensure code quality and consistency. ```shell pre-commit install ``` -------------------------------- ### SolarGeometryHandlerAstropy API Source: https://sasktran2.readthedocs.io/en/latest/api/generated/sasktran2.solar.SolarGeometryHandlerAstropy Provides methods to calculate solar angles using the astropy package. Requires astropy to be installed. ```APIDOC class sasktran2.solar.SolarGeometryHandlerAstropy(SolarGeometryHandlerBase): """Solar handler where the astropy package is used to calculate the solar angles. Must have astropy installed in the Python environment in order to use this solar handler. Interface class for the solar handler. A solar handler is used to calculate the solar angles for a give time and location. """ def __init__(): """Interface class for the solar handler. A solar handler is used to calculate the solar angles for a give time and location. """ pass def target_solar_angles(latitude: float, longitude: float, altitude: float, time: pandas.Timestamp) -> tuple[float, float]: """Calculates the solar zenith and solar azimuth angles for a given location and time. Parameters: latitude (float): Latitude in degrees north. longitude (float): Longitude in degrees east. altitude (float): Altitude in meters. time (pd.Timestamp): Time of interest. Returns: tuple[float, float]: A tuple containing the solar zenith and solar azimuth angles in degrees. Solar azimuth is relative to true north, defined clockwise from north. The azimuthal direction points towards the sun. """ pass ``` -------------------------------- ### sasktran2 Configuration API Source: https://sasktran2.readthedocs.io/en/latest/index Documentation for the sasktran2 configuration module, detailing how to set up and manage simulation parameters. ```APIDOC sasktran2.Config: Description: Manages simulation configuration settings. Methods: __init__(...): Initializes the configuration object. load_config(filepath: str): Loads configuration from a specified file. get_setting(key: str): Retrieves a specific configuration setting. set_setting(key: str, value: any): Sets a specific configuration setting. ``` -------------------------------- ### Get Atmosphere Surface (Python) Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/atmosphere Retrieves the surface object associated with the atmosphere. This is a read-only property. ```python @property def surface(self) -> sk.SurfaceStokes_1 | sk.SurfaceStokes_3: """ The surface object Returns ------- sk.Surface """ return self._atmosphere.surface ``` -------------------------------- ### Sasktran2 Core API Reference Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/constituent/brdf/modis Documentation for core Sasktran2 components including configuration, engine, geometry, and atmosphere handling. ```APIDOC sasktran2.Config: Description: Configuration management for Sasktran2 simulations. sasktran2.Engine: Description: The main simulation engine for running radiative transfer calculations. sasktran2.Geometry1D: Description: Represents one-dimensional model geometry, typically atmospheric layers. sasktran2.Atmosphere: Description: Defines the atmospheric state, including composition and vertical profiles. ``` -------------------------------- ### Get Number of Wavelengths (Python) Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/atmosphere Retrieves the number of wavelengths the atmosphere is specified at. This is a read-only property. ```python @property def num_wavel(self) -> int: """ The number of wavelengths the atmosphere is specified at Returns ------- int """ return self._nwavel ``` -------------------------------- ### Get Pressure Derivative Flag (Python) Source: https://sasktran2.readthedocs.io/en/latest/_modules/sasktran2/atmosphere Checks if the derivative with respect to pressure is being calculated. This is a read-only property. ```python @property def calculate_pressure_derivative(self) -> bool: """ True if we are calculating the derivative with respect to pressure Returns ------- bool """ return self._pressure_derivative ```