Docker/Podman image to install and run a containerised ROCKE-3D on Fedora.
- ROCKE-3D Model Description (doi:10.3847/1538-4365/aa7a06)
- ROCKE-3D Webpage
- ROCKE-3D Compilers & libraries
- ROCKE-3D Installation
- ROCKE-3D Tutorial Videos
- ROCKE-3D Publication Supplements (inc rundecks)
- Docker build help
- Docker run help
- Install service & check it's running:
Service | Instructions |
---|---|
Apptainer | Apptainer installation |
Docker | Install Docker desktop |
Podman | Podman installation |
- Download published image:
Service | Instructions |
---|---|
Apptainer | apptainer pull rocke3d.sif docker://woodwardsh/rocke3d:latest |
Docker | docker pull woodwardsh/rocke3d:latest |
Podman | podman pull woodwardsh/rocke3d:latest |
- Navigate to chosen directory for storing model input and output using
cd
- Ensure model input/output folders have been created:
mkdir -p exec huge_space prod_decks prod_input_files prod_runs
- Run/start container, noting:
- the mounting of local current working directory (
${PWD}
) to container path/home/app/ModelE_Support
for shared storage of model input/output - apptainer (see apptainer cli docs):
--compat
: improves compatability with Docker source images--unsquash -w
: allow permanent file writing to containercd /home/app
: to navigate to home directory in container (instead of outside user's home directory which is default)export HOME=/home/app
: to manually update $HOMEexport LC_CTYPE=C; export LANG=C
: fix perl locale errors (may not be needed forapptainer exec
orapptainer shell
commands)
- docker & podman:
-itd
: interactive & TTY (starts shell inside container) & detached
- podman:
--security-opt label=disable
: fixes permissions on mounted volumes (see podman run)
- the mounting of local current working directory (
Service | Instructions |
---|---|
Apptainer |
|
Docker | docker run -itd --volume=${PWD}:/home/app/ModelE_Support woodwardsh/rocke3d:latest |
Podman | podman run -itd -v ${PWD}/ModelE_Support:/home/app/ModelE_Support --security-opt label=disable woodwardsh/rocke3d:latest |
- Clone repo & navigate inside:
git clone [email protected]:hannahwoodward/docker-rocke3d.git && cd docker-rocke3d
- Build image from Dockerfile (~15 min):
docker build -t rocke3d .
- Or, if debugging:
docker build -t rocke3d . --progress=plain --no-cache
- Navigate to chosen directory for storing model input and output using
cd
- Ensure model input/output folders have been created:
mkdir -p exec huge_space prod_decks prod_input_files prod_runs
- Run locally built container:
docker run -itd -v ${PWD}/ModelE_Support:/home/app/ModelE_Support rocke3d
- Build with similar command, replacing
docker
withpodman
:
podman build -t rocke3d .
- Navigate to chosen directory for storing model input and output using
cd
- Ensure model input/output folders have been created:
mkdir -p exec huge_space prod_decks prod_input_files prod_runs
- Start container from image, with additional options to fix permissions on mounted volumes (see podman run):
podman run -itd -v ${PWD}/ModelE_Support:/home/app/ModelE_Support --security-opt label=disable rocke3d
- Start container
- Run
sh test-earth.sh
(output written toModelE_Support/huge_space/E1oM20_Test
) - Run
sh test-planet.sh
(uses SOCRATES; output written toModelE_Support/huge_space/P1SoM40_Test
)
- ROCKE-3D Diagnostics info
- The following directories have been added to
$PATH
, which contain scripts to generate readable netcdf model outputs. Use both in model output directories (i.e.ModelE_Support/huge_space/<simulation_name>
:$HOME/$MODELDIR/model/mk_diags
:scaleacc
for interim/accumulative source files (e.g.PARTIAL.acc$RUN_ID.nc aij
)sumfiles
to combine multiple acc files across different time periods- Documention can be found in
$MODELDIR/model/mk_diags/conventions.txt
$HOME/bin
:scaleaccm
the multifile equivalent ofscaleacc
, usage e.g.scaleaccm "ANN*.acc*.nc" aij
docker login && docker tag rocke3d woodwardsh/rocke3d && docker push woodwardsh/rocke3d
- Create a rundeck P2{G,S}{A,x,N}{p,q,o}{F,M}40
- GISS/SOCRATES radiation
- Atmosphere of PI Earth Ocean {p,q,o}
- M40 4degx5deg with 40 layers in atmosphere, 13 layers in ocean
- Rundeck start/stop times:
- YEAR is just an index, MONTH always 1 to 12, HOUR always 0 to 23
- Calendar system used divides days into 24 model "hours" and years into 12 "months", so with varying orbital/rotation periods will therefore not generally be 3600s or 720hrs, respectively
ISTART=2
way to tell the model that initial conditions will be provided (AIC atmosphere, ground GIC, and if relevant ocean OIC)IRANDI=X
random number generation seed/adding numerical noise, used for cloud generationmaster_yr=1850
tells model to use Earth greenhouse gas concentrationsmaster_yr=0
runs a transient simulation
- YEAR is just an index, MONTH always 1 to 12, HOUR always 0 to 23
- For non-Earth continental configurations:
- Ensure land mass added at south pole to prevent grid singularity issues
- Update
OCNDYN.f#L5812
:J1O=1
(or whatever latitude south pole landmass ends at, defaultJ1O=4
, default in imageJ1O=1
)