===== Usage ===== Due to the lack of funding support, only limited documentation has been developed. Despite the funding difficulties, we provide various examples extend from simple demo to complex research project under ``/examples`` (will be referred to as ``examples/``) and hope users can learn the usage of EaR³T from the provided examples. Examples ~~~~~~~~ .. warning:: The example code is under active development. Please check for the `latest code status `_ before use. To run the example codes, auxiliary data is required. To download the data, under ``examples/``, where it contains ``install-examples.sh``, type in the following .. code-block:: bash bash install-examples.sh * If ``install-examples.sh`` fails to download the data from Google Drive for any reason, you can download the required data manually from `here `_. After you download the file (``er3t-data-examples.tar.gz``), put it under ``examples/``, where it contains ``install-examples.sh``, then run the command ``bash install-examples.sh`` through a terminal again. Codes ``00`` (e.g., ``00_er3t_mca.py``) can be used to perform test runs. Codes ``01`` to ``04`` can be used to reproduce scientific results discussed in `Chen et al. (2023) `_. The figure results for each example are provided in ``examples/check`` (available after installing auxiliary data) for validation. | Quick Start ~~~~~~~~~~~ At current stage, we use ``MCARaTS`` as our default radiative transfer solver. To check whether EaR³T has been successfully installed, one can use ``00_er3t_mca.py`` under ``examples/``. There are total of 6 examples provided in ``00_er3t_mca.py`` (see the following from the code). .. code-block:: Python if __name__ == '__main__': # irradiance simulation #/-----------------------------------------------------------------------------\ example_01_flux_clear_sky() example_02_flux_les_cloud_3d() example_03_flux_les_cloud_3d_aerosol_1d() example_04_flux_les_cloud_3d_aerosol_3d() #\-----------------------------------------------------------------------------/ # radiance simulation #/-----------------------------------------------------------------------------\ example_05_rad_les_cloud_3d() example_06_rad_cld_gen_hem() #\-----------------------------------------------------------------------------/ pass ``example_01`` to ``example_04`` are irradiance (or flux density) simulations and ``example_05`` and ``example_06`` are radiance simulations. By default, all the simulation runs are enabled. If you would like to only run selected simulations, simply commented out the unwanted simulations in the ``00_er3t_mca.py`` code. For example, the following will only run ``example_05`` .. code-block:: Python if __name__ == '__main__': # irradiance simulation #/-----------------------------------------------------------------------------\ # example_01_flux_clear_sky() # example_02_flux_les_cloud_3d() # example_03_flux_les_cloud_3d_aerosol_1d() # example_04_flux_les_cloud_3d_aerosol_3d() #\-----------------------------------------------------------------------------/ # radiance simulation #/-----------------------------------------------------------------------------\ example_05_rad_les_cloud_3d() # example_06_rad_cld_gen_hem() #\-----------------------------------------------------------------------------/ pass To run the code, type in the following command in a terminal under ``examples/`` .. code-block:: bash python 00_er3t_mca.py You would expect something similar to the following appear on your terminal screen as indication for a successful installation .. code-block:: text Message [cld_les]: Processing ... Message [cld_les]: Downscaling data from dimension (480, 480, 100) to (480, 480, 4) ... Message [cld_les]: Saving object into ... Message [pha_mie_wc]: Phase function for 650.00nm has been stored at . Message [mca_sca]: File is created. Message [mca_atm_3d]: Creating 3D atm file for MCARaTS ... Message [mca_atm_3d]: File is created. Message [mcarats_ng]: Created MCARaTS input files under . Message [mcarats_ng]: Running MCARaTS to get output files under ... ---------------------------------------------------------- General Information Simulation : 3D Radiance Wavelength : 650.00 nm (applied SSFR slit) Date (DOY) : 2017-08-13 (225) Solar Zenith Angle : 30.0000° (0 at local zenith) Solar Azimuth Angle : 45.0000° (0 at north; 90° at east) Sensor Zenith Angle : 0.0000° (looking down, 0 straight down) Sensor Azimuth Angle : 0.0000° (0 at north; 90° at east) Sensor Altitude : 705.0 km Surface Albedo : 0.03 Phase Function : Mie (Water Clouds) Domain Size (Nx, Ny) : (480, 480) Pixel Res. (dx, dy) : (0.10 km, 0.10 km) Number of Photons / Set : 1.0e+08 (weighted over 16 g) Number of Runs : 16 (g) * 3 (set) Number of CPUs : 12 (used) of 16 (total) ---------------------------------------------------------- 0%| | 0/48 [00:00`__ for community support.