Skip to content
No description, website, or topics provided.
R Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
codes
data
plots
results
README
README.md

README.md

projectzed

A gitHub Repository including all the data and results needed to make figures 1-10 of the ‘Forecasting the Properties of the Solar Wind using Simple Pattern Recognition’ manuscript by Riley et al. See the README file for more details

——————————— Requirements ———————————

The R software package (version 3.2 or higher) The R packages: batch, date, hexbin, hydroGOF, Hmisc, Metrics, RColorBrewer, zoo (and their dependencies). Python - Version 2.7 and up. Needed only if the User wants to create, the already provided, results for figures 3-7, 9-10.

——————————— Cloning ———————————

To clone from the command line use:

%git clone https://github.com/predsci/projectzed.git

——————————— Running ———————————

Change directory to the project-zed codes directory:

% cd projectzed/codes

forecast.R will make figures 1, 2a, 2b, and 8a-d

anal-corr-coh.R will make all the other figures: 3-7, 9 and 10.

In both cases the figures will be created in the ‘plots’ sub-directory.

In both cases you can run the codes either from the command line, e.g.

% Rscript forecast.R

or from within an R session:

source(‘forecast.R’)

The util.R script includes functions used by forecast.R

To re-create the data used in Figures 3-7 9-10 we advise using the provided Python script:

run-batchPattRec.py

This script, which is simple and easy to modify, will launch 12 parallel instances of calls to the batchPattRec.R routine which is the batch version of the pattern recognition procedure. Each instance is a month number and the User can modify the year, variable and forecasting time window. Results are written to a sub-directory that is unique to a variable and forecasting time window, e.g. corr-coh-Bn-24hr. The sub-directory with the results will be created under the working directory, codes, so it does not over-write the results we already provide (see results below).

To run it use: % ./run-batchPattRec.py > log &

Please note that we provide all the results of running this script for the 2000-2010 time period for the variables Bn, vr, Temp and np (density) for forecasting windows of 24 hours and 6 hours, see the explanation of Results below.

batchPattRec.R can only be executed from the command line. It accepts as arguments the variable name (e.g. Bn, vr, Temp, np) the forecasting time window in units of hours (e.g. 24, 6) and the month and year for which we want to run the batch pattern recognition. It serves as a driver for the function ‘pattRecbatch’ which is in the pattRec.R file.

To run it from the command line and not using the Python script use for example: %Rscript batchPattRec.R whvar Bn wwindow 24 month 02 year 2010

The pattRec.R file holds the batch pattern recognition function, pattRecBatch. It is called by the batchPattRec.R driver.

—————————————————————— Questions/Problems: —————————————————————— Please email mbennun@predsci.com

You can’t perform that action at this time.