Skip to content

US Brw non OLMT Simulation Example

Shawn P. Serbin edited this page Aug 10, 2022 · 1 revision

NGEE-Arctic: US-Brw simulation example

Steps to get started:

1) Install the Docker Engine on your host machine: Install the Docker engine: https://www.docker.com/get-started

2) Open your host machine terminal

3) Pull down the latest version of the basic ELM Docker container, In your terminal run:
docker pull fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest

4) Download cpl_bypass met driver data

Define your localhost:docker paths. Replace:

"host_location"

with a location on your local machine to store the datasets (~1Gb)

export container=fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
export host_location=/Users/sserbin/Data/cesm_input_data
export repo=/Users/sserbin/Data/GitHub/fasst_simulation_tools
docker run -t -i --hostname=docker --user $(id -u):$(id -g) -v $host_location:/inputdata \
-v $repo:/scripts $container scripts/met_scripts/ngeearctic/download_elm_singlesite_forcing_data.sh

The inputs are:
container Name of the container to run; default fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
host_location The host machine location for the met data, e.g. above /Users/sserbin/Data/testing
repo The location of this code repo on the host machine to "map in" the scripts to the container

After running the command you should see something like this in your terminal output:

Screen Shot 2022-05-12 at 3 25 17 PM

and then eventually the internal files will be unpacked from the compressed archive file

Screen Shot 2022-05-12 at 3 28 21 PM

5) Build the test case example. This example consists of a series of 3 different bash scripts that are run within the container to setup the case directory on the host side

Define your localhost:docker paths. Replace:

export container=fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
export host_input_data=/Users/sserbin/Data/single_point_cesm_input_datasets
export host_output_dir=~/scratch/elm_testruns
export repo=/Users/sserbin/Data/GitHub/fasst_simulation_tools

Also define your run settings below. Then past the command into your terminal to setup a case

Create AD spin-up case

export container=fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
export host_input_data=/Users/sserbin/Data/cesm_input_data
export host_output_dir=~/scratch/elm_testruns
export scripts=/Users/sserbin/Data/GitHub/fasst_simulation_tools/elm_scripts/ngeearctic_elm_scripts

docker run -t -i --hostname=docker --user $(id -u):$(id -g) -v $host_input_data:/inputdata \
-v $scripts:/scripts -v $host_output_dir:/output $container \
/scripts/./1x1pt_US-Brw_elm_ad_spinup_cpl_bypass.sh --case_root=/output \
--site_name=1x1pt_US-Brw --start_year='0001-01-01' --num_years=250 --num_rest_years=5 \
--output_vars=/scripts/output_vars_2.txt --output_freq=FAST --compset=ICB1850CNPRDCTCBC \
--rmachine=docker

This will be an AD spinup case starting on 0001-01-01, running for 250 years, and providing a restart file every 5 years. The case will be built using the ICB1850CNPRDCTCBC cpl_bypass compset

Create final spin-up case

export container=fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
export host_input_data=/Users/sserbin/Data/cesm_input_data
export host_output_dir=~/scratch/elm_testruns
export scripts=/Users/sserbin/Data/GitHub/fasst_simulation_tools/elm_scripts/ngeearctic_elm_scripts

docker run -t -i --hostname=docker --user $(id -u):$(id -g) -v $host_input_data:/inputdata \
-v $scripts:/scripts -v $host_output_dir:/output $container \
/scripts/./1x1pt_US-Brw_elm_final_spinup_cpl_bypass.sh --case_root=/output --site_name=1x1pt_US-Brw \
--start_year='0001-01-01' --num_years=250 --num_rest_years=5 --run_ref_date=0251-01-01 \
--output_vars=/scripts/output_vars_2.txt --output_freq=FAST --compset=ICB1850CNPRDCTCBC \
--rmachine=docker

This will be an final spinup case starting on 0001-01-01, running for 250 years, and providing a restart file every 5 years. In this case the run will restart from year 251 from the AD spinup run using the "--run_ref_date=0251-01-01" flag The case will be built using the ICB1850CNPRDCTCBC cpl_bypass compset

6) Run the test case example.

Run the AD spinup case

export container=fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
export host_input_data=/Users/sserbin/Data/cesm_input_data
export host_output_dir=~/scratch/elm_testruns

docker run -t -i --hostname=docker --user $(id -u):$(id -g) -v $host_input_data:/inputdata \
-v $host_output_dir:/output $container \
/bin/sh -c 'cd /output/1x1pt_US-Brw_ELM_ICB1850CNPRDCTCBC_ad_spinup && ./case.submit'

If the run begins properly you should see output similar to below in your terminal shell

Screen Shot 2022-05-12 at 3 44 40 PM

Run final spin-up case

export container=fasstsimulation/elm-builds:release-v1.2.0_ngeearctic-latest
export host_input_data=/Users/sserbin/Data/cesm_input_data
export host_output_dir=~/scratch/elm_testruns

docker run -t -i --hostname=docker --user $(id -u):$(id -g) -v $host_input_data:/inputdata \
-v $host_output_dir:/output $container \
/bin/sh -c 'cd /output/1x1pt_US-Brw_ELM_ICB1850CNPRDCTCBC_final_spinup && ./case.submit'

Screen Shot 2022-05-13 at 9 09 17 AM

NOTE: you should see that the model executable being run for this case is the previously built model from the AD spin-up run