Skip to content

Commit

Permalink
Updating the latest commit(19 Oct 2020) of pyglow in setup_pyglow.sh …
Browse files Browse the repository at this point in the history
…that fixes an iri2016 issue for dates after year 2010.
  • Loading branch information
pmreyes2 committed Oct 19, 2020
1 parent b70e14f commit a81f824
Show file tree
Hide file tree
Showing 7 changed files with 288 additions and 1 deletion.
35 changes: 35 additions & 0 deletions resen-core/resources/helpers/setup_davitpy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
#######################################################################################
#
# A helper script for installing davitpy
#
# Assumes you have a py27 python virtual environment
#
#######################################################################################

source ${HOME}/envs/py27/bin/activate
CURDIR=$(pwd)
DAVITPY_BUILD_DIR=${CURDIR}/davitpy_build

git clone https://github.com/vtsuperdarn/davitpy.git $DAVITPY_BUILD_DIR
cd $DAVITPY_BUILD_DIR
git checkout tags/0.8-master -b 0.8-master

pip install .

# get hdw.dat and radar.dat - needed so davitpy can get radar information locally
mkdir -p ${HOME}/cache
cd ${HOME}/cache
git clone https://github.com/vtsuperdarn/hdw.dat.git
wget https://raw.githubusercontent.com/SuperDARN/rst/v4.2/tables/superdarn/radar.dat

deactivate

# cleanup
cd ${CURDIR}
rm -rf $DAVITPY_BUILD_DIR
rm ${HOME}/.wget-hsts

# set nessisary environment variables
echo "SD_HDWPATH=${HOME}/cache/hdw.dat" >> ${HOME}/.bashrc
echo "SD_RADAR=${HOME}/cache/radar.dat" >> ${HOME}/.bashrc
32 changes: 32 additions & 0 deletions resen-core/resources/helpers/setup_hdf5viewer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#######################################################################################
#
# A helper script for installing pyglow
#
# Assumes you have conda installed with a py27 virtual environment
# and another environment with the name py36
#
#######################################################################################

echo "**** Installing hdf5 viewer ****"

cd $BUILD
HDF5VIEWER_BUILD_DIR=hdf5viewer_build

git clone https://github.com/pmreyes2/jupyterlab-hdf5.git $HDF5VIEWER_BUILD_DIR

cd $HDF5VIEWER_BUILD_DIR

git checkout a8a0e9bb1771ffa630cd8ead940ac7b258e1ad8b -b master_20190921

source /home/$NB_USER/envs/py36/bin/activate

export PATH=/usr/local/lib/nodejs/node-v10.16.3-linux-x64/bin:$PATH
pip install .
jupyter labextension install jupyterlab-hdf

deactivate

# cleanup
cd $BUILD
rm -r $HDF5VIEWER_BUILD_DIR
36 changes: 36 additions & 0 deletions resen-core/resources/helpers/setup_mangopy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
#######################################################################################
#
# A helper script for installing mangopy
#
# Assumes you have a py27 virtual environment
# and another environment with the name py36
#
#######################################################################################

echo "**** Installing mangopy ****"

CWD=$(pwd)

MANGOPY_BUILD_DIR=$CWD/mangopy_build
mkdir -p $MANGOPY_BUILD_DIR

cd $MANGOPY_BUILD_DIR
git clone https://github.com/astib/MANGO.git
cd MANGO
#If we wanted a specific commit:
#git checkout b25cba78e58197394809cb8323656a1d636c3e3d -b master_06jun2019

source /home/$NB_USER/envs/py27/bin/activate
LDFLAGS="-shared" pip install .

deactivate

source /home/$NB_USER/envs/py36/bin/activate
LDFLAGS="-shared" pip install .

deactivate

# cleanup
cd $CWD
rm -r $MANGOPY_BUILD_DIR
69 changes: 69 additions & 0 deletions resen-core/resources/helpers/setup_py27_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash
#######################################################################################
#
# A helper script for setting up a python 2.7 environment
#
#######################################################################################

echo "**** Installing python 2.7 packages ****"

# upgrade pip
pip install pip==20.1.1

# Now use pip to install everything we can
# Notes: pyproj==1.9.6 required for basemap, 2.0.0 breaks basemap
pip install -U paramiko==2.4.2 \
ipython==5.8.0 \
prompt_toolkit==1.0.16 \
pymongo==3.7.2 \
mechanize==0.4.1 \
cryptography==2.6.1 \
pytest==3.0.5 \
nbformat==4.4.0 \
numpy==1.16.2 \
matplotlib==2.2.4 \
scipy==1.2.1 \
tables==3.5.1 \
sgp4==1.4 \
pandas==0.24.2 \
sympy==1.1.0 \
sqlalchemy==1.3.1 \
h5py==2.9.0 \
pytz==2018.9 \
netcdf4==1.4.3 \
bokeh==1.0.4 \
pyyaml==5.1 \
cython==0.29.6 \
sciunit2==0.4.post3.dev95073526 \
madrigalweb==3.1.10 \
pyproj==1.9.6 \
bsddb3==6.2.6 \
aacgmv2==2.5.2 \
pymap3d==1.8.1 \
astropy==2.0.14 \
ipympl==0.5.6 \
# sunpy==0.9.10

# Custom pip installation for any package that needs it
pip install apexpy==1.0.3 # have to install after installing numpy

pip install cartopy==0.17.0

pip install spacepy==0.2.1
source /usr/local/bin/definitions.B # to set the CDF definitios including $CDF_LIB
# only update omni and qin-denton since maia.usno.navy.mil/ser7/tai-utc.dat leapseconds website was down at the time...
python -uc "import spacepy.toolbox; spacepy.toolbox.update(QDomni=True)"
# spacepy 0.2.1 doesn't clean up this file. Submitted issue and PR to spacepy, see https://github.com/spacepy/spacepy/pull/219
rm OMNI_OMNI2_merged_20120213-v1.cdf

# Installing mangopy (14 June 2018)
pip install git+https://github.com/astib/MANGO.git@2dd4ca5380dca54cac8d2180c3ad63fc041a5c67

# Install visuamisr
pip install git+https://github.com/asreimer/visuamisr.git@v2.0.3

# Install citationhelper
pip install git+https://github.com/EarthCubeInGeo/citationhelper.git@v0.2

# cleanup
rm -rf ~/.cache/pip/*
74 changes: 74 additions & 0 deletions resen-core/resources/helpers/setup_py36_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/bash
#######################################################################################
#
# A helper script for setting up a python 3.6 environment
#
#######################################################################################

echo "**** Installing python 3.6 packages ****"

# upgrade pip
pip install pip==20.1.1

# Now use pip to install everything we can
# Notes: pyproj==1.9.6 required for basemap, 2.0.0 breaks basemap
pip install -U jupyterhub==1.0.0 \
jupyterlab==2.1.2 \
notebook==6.0.3 \
paramiko==2.7.1 \
ipython==7.14.0 \
pymongo==3.10.1 \
mechanize==0.4.5 \
cryptography==2.9.2 \
pytest==5.4.2 \
nbformat==5.0.6 \
numpy==1.18.4 \
matplotlib==3.2.1 \
scipy==1.4.1 \
tables==3.6.1 \
sgp4==2.8 \
pandas==1.0.3 \
sympy==1.5.1 \
sqlalchemy==1.3.17 \
h5py==2.10.0 \
pytz==2020.1 \
netcdf4==1.5.3 \
bokeh==2.0.2 \
pyyaml==5.3.1 \
cython==0.29.18 \
pyproj==2.6.1.post1 \
madrigalweb==3.1.12 \
bsddb3==6.2.7 \
aacgmv2==2.6.0 \
pymap3d==2.4.1 \
astropy==3.2.1 \
plasmapy==0.3.1 \
pydarn==1.0.0.1 \
viresclient==0.6.1 \
ipympl==0.5.6 \
hdfviewer==0.11.0 \
watermark==2.0.2

# Custom pip installation for any package that needs it
pip install apexpy==1.0.3 # have to install after installing numpy

pip install cartopy==0.18.0 # have to install after installing numpy

pip install spacepy==0.2.1
source /usr/local/bin/definitions.B # to set the CDF definitios including $CDF_LIB
# only update omni and qin-denton since maia.usno.navy.mil/ser7/tai-utc.dat leapseconds website was down at the time...
python -uc "import spacepy.toolbox; spacepy.toolbox.update(QDomni=True)"
# spacepy 0.2.1 doesn't clean up this file. Submitted issue and PR to spacepy, see https://github.com/spacepy/spacepy/pull/219
rm OMNI_OMNI2_merged_20120213-v1.cdf

# Installing mangopy (14 June 2018)
pip install git+https://github.com/astib/MANGO.git@2dd4ca5380dca54cac8d2180c3ad63fc041a5c67

# Install visuamisr
pip install git+https://github.com/asreimer/visuamisr.git@v2.0.3

# Install citationhelper
pip install git+https://github.com/EarthCubeInGeo/citationhelper.git@v0.2

# cleanup
rm -rf ~/.cache/pip/*
2 changes: 1 addition & 1 deletion resen-core/resources/helpers/setup_pyglow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PYGLOW_BUILD_DIR=pyglow_build

git clone https://github.com/timduly4/pyglow.git $PYGLOW_BUILD_DIR
cd $PYGLOW_BUILD_DIR
git checkout 054bf800263c01ecfa783741c9cfe8d3d6c259ca -b master_20190904
git checkout 36e998524cf603cf61ca7d98ced61e2f945ab1df -b master_20201019

source ${HOME}/envs/py38/bin/activate

Expand Down
41 changes: 41 additions & 0 deletions resen-core/resources/helpers/setup_spacepy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
#######################################################################################
#
# A helper script for installing spacepy
#
# Assumes you have conda installed with a py27 virtual environment
# and another environment with the name py36
#
#######################################################################################

echo "**** Installing spacepy ****"

cd $BUILD
SPACEPY_BUILD_DIR=spacepy_build

git clone https://github.com/spacepy/spacepy.git $SPACEPY_BUILD_DIR
cd $SPACEPY_BUILD_DIR
git checkout 8b8c2d56ebdcb1d3a59fd868a1c92f34ce16ec64 -b 0.1.6_withfix

source /home/$NB_USER/envs/py27/bin/activate
pip install .

deactivate

source /home/$NB_USER/envs/py36/bin/activate
pip install .

# some post-pip initialization of packages
cd $BUILD
source /usr/local/bin/definitions.B # to set the CDF definitios including $CDF_LIB
python -c "import spacepy.toolbox; spacepy.toolbox.update()"
# a file about 195 MB called OMNI_OMNI2_merged_20120213-v1.cdf
# has been created and will be removed later on. The data is kept
# inside ~/.spacepy
echo "support_notice: False" >> /home/$NB_USER/.spacepy/spacepy.rc

deactivate

# cleanup
cd $BUILD
rm -r $SPACEPY_BUILD_DIR

0 comments on commit a81f824

Please sign in to comment.