bourque / lasp_exercise

1 stars 0 forks source link

LASP Solar Irradiance Exercise

This repository contains software and supporting materials for an exercise to calculate the solar irradiance using data from the SOlar Stellar Irradiance Comparison Experiment (SOLSTICE) Experiment. This README serves as a summary of the exercise.

See exercise_instructions.txt for more information about SOLSTICE, the goals of this exercise, as well as the various data and calculations used.

The main software to perform this exercise is contained within the exercise.py module. The data/ directory contains the data from the SOLSTICE instrument (described further in the data section), and the plots/ directory contains plots of the results (described further in the results section). The requirements.txt and environment.yml file contain the dependencies needed to install and run the software (described further in the installation section).

Table of Contents

  1. Installation and Usage
  2. Data
  3. Results
  4. Software Design and Approach
  5. Assumptions and Shortcomings
  6. Potential Improvements

Installation and Usage

The software is intended to run in a Python 3 environment, however it has only been tested with Python 3.9 specifically.

There are only a few third-party dependencies required to run the software, which are provided in requirements.txt. To install these, run:

pip install -r requirements.txt

Another option for installing the necessary dependencies is using conda. More information about conda and how to acquire/install it can be found here:

With conda installed, users can install the environment by running:

conda create -n <env_name> -f environment.yml

where <env_name> is the name you wish to call the environment.

To run the software from the command line, run:

python exercise.py

To run the software from within a python interpreter:

ie = IrradianceExercise()
ie.get_data()
ie.make_plots_input_data()
ie.run_calculations()
ie.make_plots_results()

Successful execution of the software will result in the creation of three plots:

These plots are further described in the results section.

Data

Several collections of data were used to perform this exercise. Data are provided in various CSV files (described below). For temporal data, time measurements are recorded as the number of microseconds since 1980-01-06 00:00:00.000 (labeled as microsecondsSinceGpsEpoch). The data for this exercise cover a timespan of roughly 8 hours, while telemetry measurements of detector temperatures and instrument distances/velocity cover roughly 12 hours.

The plot below shows the values of the data described above over time or wavelength. The green, gray, and red shaded regions signify the time coverage of the DownScan, Dark, and UpScan experiments, respectively. You may click on the plot in order to expand it in a new window.

Results

The following plot shows the irradiance (in watts/m2/nm) for the DownScan (green) and UpScan (red) over a wavelength range of 180nm -183 nm. This wavelength range was chosen to showcase the two emission lines located near \~180 nm. The values provided are irradiances as they would be measured from a distance of 1AU. The plot also displays the reference spectrum (black).

The next plot displays the ratio of the DownScan irradiances and the reference spectrum (green), as well as the ratio of the UpScan irradiances and the reference spectrum (red). This is also shown over the 180nm - 183nm wavelength range.

Software Design and Approach

The following points describe some of the design decisions that I made when writing the software to support this exercise:

Assumptions and Shortcomings

While this object-oriented approach has its advantages, there are also a few shortcomings to this approach that should be noted:

I also made a few assumptions about the data and/or results, notably:

Potential Improvements

Given more time, there are several improvements that could be made to this software:

Final Note

I would like to thank the folks at LASP for the opportunity to showcase my work. It had been quite some time since I've thought about some of these equations (probably since my time at Florida Tech in ~2010); it was fun to apply that knowledge again!