Skip to content

Instantly share code, notes, and snippets.

@jbu
Last active August 29, 2015 14:18
Show Gist options
  • Save jbu/ca44dbea0f72e77e627b to your computer and use it in GitHub Desktop.
Save jbu/ca44dbea0f72e77e627b to your computer and use it in GitHub Desktop.
ModelE
FROM debian:wheezy
RUN apt-get update && \
apt-get install -y \
gfortran \
ksh \
libnetcdf-dev \
make \
patch \
python-dev \
wget \
vim && \
apt-get clean
ADD http://simplex.giss.nasa.gov/snapshots/modelE2_AR5_branch.2015.03.07_01.07.26.tgz /
RUN cd / && \
tar fxz modelE2_AR5_branch.2015.03.07_01.07.26.tgz && \
rm modelE2_AR5_branch.2015.03.07_01.07.26.tgz && \
mv modelE2_AR5_branch modelE && \
chown -R root:root modelE
RUN mkdir /runs && \
cd /runs && \
wget -i https://gist.githubusercontent.com/jbu/ca44dbea0f72e77e627b/raw/inputs.txt
ADD https://gist.githubusercontent.com/jbu/ca44dbea0f72e77e627b/raw/run.sh /modelE/
RUN chmod +x /modelE/run.sh
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/AIC.RES_M20A.D771201
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/GIC.E046D3M20A.1DEC1955.ext.nc
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/OST4X5.B.1876-85avg.Hadl1.1
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/SICE4X5.B.1876-85avg.Hadl1.1
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/Z1O.B4X5.cor
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/Z72X46N.cor4_nocasp
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/S4X50093.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/V72X46.1.cor2_no_crops.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/CROPS2007_72X46N.cor4_nocasp
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/CD4X500S.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/REG4X5
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/RD_modelE_M.RVR.bin
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/top_index_72x46_a.ij.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/sgpgxg.table8
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/LWTables33k.1a
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/LWTables33k.1b
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/H2Ocont_MT_CKD
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/solar.DBbglean.ann850-2000.uvflux_hdr
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/GHG.Mar2009.txt
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/MSU.RSS.weights.data
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/GLMELT_4X5.OCN
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/CD144X90.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/V144X90_no_crops.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/CROPS_and_pastures_Pongratz_to_Hurtt_144X90N_nocasp
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/S144X900098M.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/top_index_144x90_a.ij.ext
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/soil_textures_top30cm_2x2.5
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/soilcarb_top30cm_nmaps_2x2.5bin.dat
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/GLMELT_144X90_gas.OCN
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/miescatpar.abcdv2
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/oct2003.relhum.nr.Q633G633.table
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/dust_mass_CakmurMillerJGR06_72x46x20x7x12
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/STRATAER.VOL.SATO.1850-1999.Apr02_hdr
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/cloud.epsilon4.72x46
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/topcld.trscat8
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/ISCCP.tautables
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/dH2O_by_CH4_monthly
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/BC.Dry+Wet.depositions.ann
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/SUL_Koch2008_kg_m2_72x46x20_1890-2000h
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/SSA_Koch2008_kg_m2_72x46x20h
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/NIT_Bauer2008_kg_m2_72x46x20_1890-2000h
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/OCA_Koch2008_kg_m2_72x46x20_1890-2000h
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/BCA_Koch2008_kg_m2_72x46x20_1890-2000h
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/BCB_Koch2008_kg_m2_72x46x20_1890-2000h
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1850
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1890
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1910
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1930
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1950
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1960
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2004_o3_shindelltrop_72x46x49x12_1970
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2005_o3_shindelltrop_72x46x49x12_1980
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2005_o3_shindelltrop_72x46x49x12_1990
http://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/mar2005_o3timetrend_46x49x2412_1850_2050
# get docker machine https://docs.docker.com/machine/
docker-machine create --driver virtualbox modele
$(docker-machine env modele)
docker-machine start modele
docker $(docker-machine config modele) build -t modele https://gist.githubusercontent.com/jbu/ca44dbea0f72e77e627b/raw/Dockerfile
docker $(docker-machine config modele) run -it modele bash
docker-machine stop modele
docker-machine rm modele
#!/bin/bash
export PATH=.:$PATH
cd decks
export COMPILER=gfortran
mkdir /runs/decks
mkdir /runs/output
make config
cat /root/.modelErc |
sed 's/^\(DECKS_REPOSITORY=\).*/\1\/runs\/decks/g'|
sed 's/^\(CMRUNDIR=\).*/\1\/runs/g' |
sed 's/^\(GCMSEARCHPATH=\).*/\1\/runs/g' |
sed 's/^\(EXECDIR=\).*/\1\/modelE\/exec/g' |
sed 's/^\(NETCDFHOME=\).*/\1\/usr/g' |
sed 's/^\(SAVEDISK=\).*/\1\/runs\/output/g' > o && mv o /root/.modelErc
sed 's/-lnetcdf$/&f/g' < /modelE/config/rules.mk > o && mv o /modelE/config/rules.mk
make rundeck RUN=my_run
sed 's/YEARE=1949/YEARE=1950/g' < /modelE/decks/my_run.R > o && mv o /modelE/decks/my_run.R
make gcm RUN=my_run
make setup RUN=my_run
#make aux RUN=my_run
../exec/runE my_run
#../exec/pdE my_run JAN1987.accmy_run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment