CentOS environment preconfigured for Community Land Model 5.0.
998
Follow these steps after pulling the image.
This folder will be shared between the host OS and the CLM5 container. The following command creates a p folder structure similar to JSC file systems.
[user@pc ~] mkdir -vp p/project p/scratch/CESMDATAROOT/inputdata
[user@pc ~] tree p
p
├── project
└── scratch
└── CESMDATAROOT
└── inputdata
[user@pc ~]$ docker run --hostname clm5-docker --name myclm -it --mount type=bind,source="$(pwd)"/p,target=/p hpscterrsys/clm5:latest
[clmuser@clm5docker ~]$
Explanation of options:
--name myclm: Container name. You can change this to any desired name.--hostname clm5-docker: Sets the hostname of the container. Don't change this since this is already recognized by the CLM5 image as a supported machine.--mount type=bind,source="$(pwd)"/p,target=/p Exposes the host folder p to the container. This would appear as the /p file system inside the container.-it Short for --interactive --tty; immediately starts the terminal session to the container after it is created.hpscterrsys/clm5:latest The image where the container will be based from. Its syntax is REPOSITORY:TAG.First, set folder ownerships to avoid permission issues when building and running CLM5.
[clmuser@clm5docker ~]$ sudo chown -R $USER /p /home/clmuser/.cime
[clmuser@clm5docker ~]$ sudo chgrp -R clm5docker /p /home/clmuser/.cime
Try to get acquainted with the CLM5 environment. You can run a few commands from the list below.
cat /etc/os-release Get OS versiongcc --version && gfortran --version View gcc and gfortran versionssudo yum info openmpi3 Check version of installed MPI libraryncdump View netCDF versiontree /p View /p file systemsudo yum install nano Install nano text editorcat ~/.bash_profile View preset CLM5 environment variablessource ~/.bash_profile Update current environment with the changes in .bash_profileIf you switched to root and tried to log back in as clmuser, the password is clm5.
The container has all the dependencies required to run CLM5. Start cloning NCAR CLM5.0 and then save it under the $PROJECT folder.
[clmuser@clm5docker ~]$ cd $PROJECT
[clmuser@clm5docker project]$ git clone -b release-clm5.0 https://github.com/ESCOMP/CTSM.git clm5.0
[clmuser@clm5docker project]$ cd clm5.0
[clmuser@clm5docker clm5.0]$ ./manage_externals/checkout_externals
Test if CLM5 works by running the single-point Mexico case.
[clmuser@clm5docker clm5.0]$ cd ./cime/scripts
[clmuser@clm5docker scripts]$ ./create_newcase --case testMXC --res 1x1_mexicocityMEX --compset I1PtClm50SpGs --run-unsupported
[clmuser@clm5docker scripts]$ cd testMXC
[clmuser@clm5docker testMXC]$ ./case.setup
[clmuser@clm5docker testMXC]$ ./case.build
[clmuser@clm5docker testMXC]$ ./case.submit
The container does not have a batch scheduling software (its a single user system so it doesn't need one) so just ignore the error message ERROR: No result from jobs [('case.run', None), ('case.st_archive', 'case.run or case.test')] from the ./case.submit step. Furthermore, expect ./case.submit to take some time since it has to download missing case files from NCAR's ftp server. Once the case files become available, the model will run and then finish immediately.
Check the outputs generated by the model. You can also browse the data in netCDF files via the ncdump tool.
[clmuser@clm5docker testMXC]$ tree $SCRATCH/CESMDATAROOT/CaseOutputs/testMXC/run
/p/scratch/CESMDATAROOT/CaseOutputs/testMXC/run
├── atm_modelio.nml
├── CASEROOT
├── cpl_modelio.nml
├── datm_in
├── datm.streams.txt.CLM1PT.1x1_mexicocityMEX
├── datm.streams.txt.presaero.clim_2000
├── datm.streams.txt.topo.observed
├── drv_flds_in
├── drv_in
├── esp_modelio.nml
├── finidat_interp_dest.nc
├── glc_modelio.nml
├── ice_modelio.nml
├── lnd_in
├── lnd_modelio.nml
├── mosart_in
├── ocn_modelio.nml
├── rof_modelio.nml
├── rpointer.atm
├── rpointer.drv
├── rpointer.lnd
├── seq_maps.rc
├── testMXC.clm2.r.1993-12-07-50400.nc
├── testMXC.clm2.rh0.1993-12-07-50400.nc
├── testMXC.cpl.r.1993-12-07-50400.nc
├── testMXC.datm.rs1.1993-12-07-50400.bin
├── timing
│ ├── checkpoints
│ │ ├── model_timing_19931202_00000.0
│ │ └── model_timing_19931202_00000_stats
│ ├── model_timing.0
│ └── model_timing_stats
└── wav_modelio.nml
[clmuser@clm5docker testMXC]$ ncdump -h $SCRATCH/CESMDATAROOT/CaseOutputs/testMXC/run/testMXC.clm2.r.1993-12-07-50400.nc | less
You can also view and open model output files from your host machine by going to the p folder that was created on the first step. If you created this folder on your home directory, the single-point Mexico model outputs would be at ~/p/scratch/CESMDATAROOT/CaseOutputs/testMXC/run/.
This container was created to aid in the development and testing of CLM5. While it can be used to run single point cases on a laptop, you should not expect it to be able to handle larger simulations that are typically ran on a supercomputer.
The Dockerfile for this image can be found at https://github.com/HPSCTerrSys/docker-images/tree/master/release/clm5
For more information about CLM5.0, please visit the official project page.
Content type
Image
Digest
Size
679 MB
Last updated
almost 6 years ago
docker pull hpscterrsys/clm5