Using host directories instead of Docker volumes for model data or ELM output - FASSt-simulation/fasst_simulation_tools GitHub Wiki

Using a host directory to store the required ELM input data (i.e. met forcing, surface files, parameter files, etc)

  • Create a local directory on the host computer to contain the met forcing data by running this code in your terminal mkdir -p ~/elmdata Note that the terminal window will spit back an address for this new folder that looks like this

image

  • Download the data to this location by typing the following code BUT you will need to modify the folder location to match the address on you computer where the folder elmdata lives that showed up when you ran the above command (Ie, remove and replace C:/Users/vsi/scratch/)
docker run -t -i --hostname=docker --user modeluser -v C:/Users/vsi/scratch/elmdata:/inputdata fasstsimulation/elm-builds:elm_v2-for-ngee_multiarch /scripts/download_elm_singlesite_forcing_data.sh
  • If this is working you will see lot of lines of code ending in .nc flash by
  • The download will pause at one point and ask if you want to replace or a file. Hit y and enter
  • When you are done, the last line on the terminal will read *** DONE***
  • Navigate to the elmdata folder on your computer and check that it is full of data (should be ~1.2GB in size)

Using a host directory to store ELM simulation output

  1. First, you need to decide where you want to create the output folder on your host machine and make sure the path is mapped as a resource in your Docker Desktop application. For example "/Users/sserbin/scratch/elmoutput" In this case "/Users/sserbin/scratch/" needs to be mapped in the File Sharing Resources page Screen Shot 2022-10-05 at 8 55 38 AM

  2. Next, make sure the desired output directory exists on your host machine. e.g. mkdir -p /Users/sserbin/scratch/elmoutput

  3. Once you have your new host directory and its mapped in Docker, you can use this location to store ELM simulation output. You can do this within the standard Docker call for starting a simulation. For example, to store in "/Users/sserbin/scratch/elmoutput" you can copy and past this text into an open terminal:

docker run -t -i --hostname=docker --user modeluser -v elmdata:/inputdata -v /Users/sserbin/scratch/elmoutput:/output fasstsimulation/elm-builds:elm_v2-for-ngee_multiarch /scripts/OLMT_docker_example.sh --site_name=beo --ad_spinup_years=20 --final_spinup_years=30 --transient_years=5

Note: The default elmoutput:/output has been replaced with /Users/sserbin/scratch/elmoutput:/output Also note that Docker requires full paths to output locations, e.g. /Users/sserbin/scratch/elmoutput:/output and not ~/scratch/elmoutput:/output

Return to Home