# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: ssrs_env
#     language: python
#     name: ssrs_env
# ---

# # Eagle Behavior and Risk Modeling for Wind Energy workshop 
# ## Stochastic Soaring Raptor Simulator (SSRS)
# ### Instructions for running the demo.ipynb jupyter notebook provided in the workshop folder

# This document provides instructions on installing SSRS on your local machine and running the notebooks provided in this workshop folder of the Github repository. These instructions have been tested for Unix OS (Linux/MacOS) and may
# require slight modification for Windows OS. 
#
# Github repository: https://github.com/NREL/SSRS 
#
# Journal publication: Stochastic agent-based model for predicting turbine-scale raptor movements during updraft-subsidized directional flights. Ecological Modelling, April 2022. [link](https://www.sciencedirect.com/science/article/pii/S0304380022000047)

# #### Installing SSRS

# 1) Make sure following are installed on your local machine before the workshop demos start:
#  - Terminal ([Instructions for Windows](https://docs.microsoft.com/en-us/windows/terminal/))
#  - Git ([install instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git))
#  - Miniconda ([install instructions](https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links))

# 2) Open the terminal and go to the directory where you want to clone/install SSRS
# ```console
# rsandhu@mac$ pwd
# /Users/rsandhu/workshop
# ```

# 3) Clone SSRS using the following command, which will create a folder named 'SSRS'
# ```console
# rsandhu@mac$ git clone https://github.com/NREL/SSRS.git
# ```

# 4) Go to SSRS directory
# ```console
# rsandhu@mac$ cd SSRS/
# ```

# 5) Create the conda environment with name 'myenv' using the .yml file in the SSRS directory
# ```console
# rsandhu@mac$ conda env create -f environment.yml -n myenv
# ```

# 6) Check if conda environment was created successfully, this command should list myenv as one of the conda envs
# ```console
# rsandhu@mac$ conda env list
# ```

# 7) Activate the installed conda environments
# ```console
# rsandhu@mac$ conda activate myenv
# ```

# 8) Install SSRS (use the -e flag before . if editing the SSRS source code)
# ```console
# rsandhu@mac$ pip install .
# ```

# 9) Check if SSRS is installed by running this command, and checking for ssrs in the list
# ```console
# rsandhu@mac$ conda list
# ```

# #### Running Jupyter notebooks from myenv

# 1) From the installed conda environment, install pykernel 
# ```console
# rsandhu@mac$ conda install ipykernel
# ```

# 2) Add the ipykernel kernel for the myenv environement
# ```console
# rsandhu@mac$ ipython kernel install --user --name=myenv
# ```

# 2) Add the ipykernel kernel for the myenv environement
# ```console
# rsandhu@mac$ conda install jupyter
# ```

# 3) Launch Jupyter notebook from the terminal
# ```console
# rsandhu@mac$ jupyter notebook
# ```

# 4) The jupyter notebook will open to the SSRS direcotry. Go to the workshop or the notebooks folder and then open any notebook (.ipynb files), and make sure the kernel is selected to be myenv (Kernel -> Change kernel -> myenv).

# #### Getting API key for using NREL's WTK dataset in SSRS

# 1) Open this [link](https://developer.nrel.gov/signup/), enter your name and email, and click signup. You will get an API key. Copy the API key

# 2) Open the .hscfg_need_api_key file that comes shipped in SSRS/notebooks, SSRS/workshop and SSRS/examples, and  put the API key in that file and then rename it as .hscfg. Only do it for the directory where you are running the code.

StarcoderdataJupyterScriptsDedupFiltered