WebMSISE00.jl Documentation
Accesses and runs the MSISE00 Earth atmosphere model on NASA's Model Web site.
Description
Accesses the NASA Model Web site to generate and retrieve MSISE00 atmospheric model profiles. Also contains routines for storing & retrieving results to/from JLD2 files.
For simple examples, see the accompanying Pluto notebook.
NOTE Please do not abuse the NASA ModelWeb site!! If you anticipate many runs, consider downloading the model code and running a local copy.
DEPENDENCIES: the following package versions were used
- AbstractTrees v0.3.4
- CSV v0.8.4
- DataFrames v1.1.1
- DataStructures v0.18.9
- Gumbo v0.8.0
- HTTP v0.9.8
- JLD2 v0.4.7
Installation
The package can be installed by pointing at the GitHub repo: https://github.com/fyzycyst/WebMSISE00.jl
Project Status
This project was done purely as an exercise to learn Julia and, secondarily, to learn web scraping at a level beyond the usual 'there's an HTML table, get it!'
However, if this should be of modest use (I can think of educational uses), please let me know.
Comments & Questions
All helpful comments/suggestions are welcome. Questions too. I can be reached at... e.strobel.phd@gmail.com
Functions
WebMSISE00 — ModuleWebMSISE00Load this module to access the functions below...
WebMSISE00.ReadMSISE — FunctionReadMSISE(case_inputs::Dict, casename::String = "")
Executes an MSISE00 run on NASA's Model Web site.
Uses HTTP.jl and Gumbo.jl to access the appropriate PHP form on the NASA
Model Web site, submits the form, then scrapes the resulting data. The data
is returned in a DataFrame.
INPUT:
`case_inputs` is a Dict that gets merged with the default settings
contained in the payload Dict below.
`casename` is used as the basis of the filename for storing output into
a JLD2 file (no string means "don't write a file")
OUTPUT: casename.jld2 (optional)
RETURNS: DataFrame containing the requested atmospheric dataWebMSISE00.WriteMSISEData — FunctionWriteMSISEData(casename::String, run_echo::String, rundata::DataFrame)Writes the MSISE00 results to a JLD2 file.
Used for storing chunks of the MSISE00 output to a file for later use.
INPUT: casename = basis for the filename ('.jld2' extension is added) run_echo = the ModelWeb site echos back the inputs at the top of its output, this string contains just that portion of the output rundata = the DataFrame containing the parsed MSISE00 output
OUTPUT: 'casename.jld2' file containing stored data
RETURNS: none
WebMSISE00.ReadMSISEData — FunctionReadMSISEData(casename::String)Reads MSISE00 results from a JLD2 file.
INPUT: casename = basis for the filename ('.jld2' extension is added)
OUTPUT: none
RETURNS: run_echo = the ModelWeb site echos back the inputs at the top of its output, this string contains just that portion of the output rundata = the DataFrame containing the parsed MSISE00 output