# Cloudview1

Keywords: sky, modtran, mirror, cloud masks

## Summary

This scene contains a mirrored hemisphere that reflects what a MODTRAN-driven sky irradiance field looks like over a roughly 8 hour and 20 minute time period and demonstrates the addition of cloud "masks" to the NewAtmosphere plugin.

## Details

Much like the Skyview1 demo, a mirrored hemisphere is used to visualize the sky irradiance pattern predicted by a MODTRAN-driven NewAtmosphere model generated by the atm_builder. The sensor uses the Raw capture method to create a spectral radiance image cube for the Vis/NIR region of the spectrum. It also incorporates the use of cloud fraction "masks" that describe a quick and simplified model of how clouds affect the downwelled irradiance. The fraction maps (individual images of the fractional cloud content of the sky dome) are used in conjunction with a simplified spectral model of cloud irradiance parametrized by a scalar ratio of the cloud to open sky for a blue (490nm) wavelength. For more details, see the corresponding entry in the online documentation. It is only intended as a plausible approximation in the visible and NIR.

Important | The cloud mask does not model physical (volumetric clouds), only a variation in the downwelled irradiance from the atmosphere. They do not cast shadows nor are they visible from a top down sensor. They are primarily intended as a way to study angular variation in downwelled irradiance at the surface (for example, the impact of clouds from a roughened sea surface)

## Important Files

This section highlights key files important to the simulation.

### The Scene

The scene geometry is contained in the `geometry` folder. The ground, arrows and letters are described by polygon geometry in various OBJ files that are instanced in `geometry/demo.glist`. This glist file also contains as `SPHERE` geometry primitive that is half buried in the ground. The simple materials for the ground, arrows and letters are not worthy of discussion. The North and East letters are placed vertically outside the field of view so they are seen in the reflection.

Like the Skyview1 demo, the mirror material assigned to the hemisphere describes a perfect reflector with no loss of energy at the surface

### The Atmosphere

The atmosphere uses the NewAtmosphere radiative transfer model to access MODTRAN for the atmospheric path radiances and transmissions. The MODTRAN model is driven by the `mls_rural_23km.tp5` tape5 file, which uses the mid-latitude summer (MLS) atmospheric profile and rural aerosol model with a 23 km visibility. The atmospheric database is stored in the file `classic_mls_rural_23km.adb.hdf` and is generated using the atm_builder tool.

### The Platform

The `demo.platform` file describes a simple 320 x 240 (QVGA) camera that is configured with the Raw capture method to create a spectral radiance cube from 0.400 to 0.800 microns at 0.010 micron spectral sampling. The platform was placed at a low view angle (high declination angle) and just North of East in order to see the reflection of the sun rise at the start. The clock rate of the sensor is set to take an instantaneous shot every 15 minutes, creating a series of images over the day.

### The Simulation

This demo uses the JSON based simulation file (".jsim") which includes the setup for the "NewAtmosphere" plugin and the additional cloud masks entry (see the online documentation for more information about both formats and available options, particularly how to modify the NewAtmosphere setup to use your MODTRAN profile).

### The Masks

All cloud masks used for the demo are contained in the "masks" subfolder. A contact sheet is provided for reference:

Figure 1. Contact sheet of 100 cloud fraction masks (only a subset are used in the demo)

There are enough cloud masks use a different one every 5 minutes (and the time step per frame is set as such), but since captures occur every 15 minutes only every third frame is used during the simulation.

## Results

RGB visualizations of the spectral image cubes (`demo-t0000-t00**.img`) generated by the simulation can be created using the 0.65, 0.55 and 0.45 micron channels (bands 25, 15, and 5 ) using the image_tool:

    image_tool convert --gains=1e4 --biases=0 --bands=25,15,5 demo-t*.img

The resultant series of images can be combined into a movie using ffmpeg or a similar tool.

Figure 2. An RGB visualization of the spectral image cube over time.