Skip to content

Repository for the Framework for Accessing Changes To Sea-level (FACTS) coupling with Hector

License

Notifications You must be signed in to change notification settings

JGCRI/hector-facts

 
 

Repository files navigation

Hector-FACTS

Framework for Assessing Changes To Sea-level (FACTS)

DOI

The Framework for Assessing Changes To Sea-level (FACTS) is an open-source modular, scalable, and extensive framework for global mean, regional, and extreme sea level projection that is designed to support the characterization of ambiguity in sea-level projections. It is designed so users can easily explore deep uncertainty by investigating the implications on GMSL, RSL, and ESL of different choices for different processes. Its modularity allows components to be represented by either simple or complex model. Because it is built upon the Radical-PILOT computing stack, different modules can be dispatched for execution on resources appropriate to their computational complexity.

FACTS is being developed by the Earth System Science & Policy Lab and the RADICAL Research Group at Rutgers University. FACTS is released under the MIT License.

See fact-sealevel.readthedocs.io for documentation.

For model description, see Kopp, R. E., Garner, G. G., Hermans, T. H. J., Jha, S., Kumar, P., Reedy, A., Slangen, A. B. A., Turilli, M., Edwards, T. L., Gregory, J. M., Koubbe, G., Levermann, A., Merzky, A., Nowicki, S., Palmer, M. D., & Smith, C. (2023). The Framework for Assessing Changes To Sea-Level (FACTS) v1.0: A platform for characterizing parametric and structural uncertainty in future global, relative, and extreme sea-level change. Geoscientific Model Development, 16, 7461–7489.

Hector

DOI

Hector is an open source, object-oriented, simple global climate carbon-cycle model that runs very quickly while still representing the most critical global scale earth system processes. Hector is a simple climate model (SCM, also known as a reduced-complexity climate model), a class of models that are extremely versatile with a wide range of applications. Due to their computational efficiency, SCMs can easily be coupled to other models and used to design scenarios, emulate more complex climate models, and conduct uncertainty analyses.

Hector-FACTS

This is a forked repository of the FACTS project which has been modified to use simple cliamte model Hector in addition to Fair in its run. Integrating Hector into FACTS was done by Hector team members Kalyn Dorheim and Ciara Donegan.

Installing Hector-FACTS on Your Machine

Prerequisites: git and docker

1. Install git (if not already installed)

To install git, open your terminal and use the appropriate command for your operating system:

On Ubuntu or Debian-based systems:

sudo apt-get update
sudo apt-get install git

On macOS:

brew install git

On Windows:

Install git via the Git for Windows installer.

To verify git is installed, run:

git --version

2. Install docker (if not already installed)

To install docker, follow the instructions for your operating system:

On Ubuntu or Debian-based systems:

sudo apt-get update
sudo apt-get install docker.io
sudo systemctl start docker
sudo systemctl enable docker

On macOS or Windows:

Download and install Docker from the official Docker website.

To verify docker is installed, run:

docker --version

3. Clone the Hector-FACTS repository

Once git is installed, clone the Hector-FACTS repository:

git clone https://github.com/JGCRI/hector-facts.git

Navigate to the Hector-FACTS directory this will be project working direcotry (PROJ_DIR) for the rest of the instructions.

4. Install Project Data

From the PROJ_DIR navigate to the modules-data folder and run the following to install the large data files that are stored on zenodo too large to save to github and has to be hosted on zenodo.

cd modules-data
wget -i modules-data.urls.txt

5. Docker Setup

Unless you are on a Linux machine, the best way to run FACTS is using Docker. If you are new to Docker, we recommend visiting the the offical docker documentaion for examples and reference materials. Here, we provide minimal instructions for getting Hector-FACTS running.

From the PROJ_DIR, build the Docker image. This process installs the dependencies and sets up the Hector-FACTS environment, which can be time-consuming but only needs to be done once (or after updating the Dockerfile or shutting down the image).

cd docker
sh develop.sh

Build the container where Hector-FACTS (and FACTS) experiments can be run. Note: Replace PROJ_DIR with the full path to the Hector-FACTS repository. After launching, navigate to the /opt folder. Running ls here should show the contents of the Hector-FACTS repository.

docker run --rm -it -v PROJ_DIR:/opt facts
cd opt
ls

To check to see if everything it set up properly by running the dummy experiment.

python3 runFACTS.py experiments/dummy

The output should resemble the following, but the most important thing to look for is the line: All components terminated. This indicates that the experiment successfully completed. If you do not see this message, it may mean the experiment encountered an error, and further investigation may be needed.

EnTK session: re.session.db906fca-1de6-11ef-9cca-0242ac110002
Creating AppManager
Setting up ZMQ queues                                                         ok
AppManager initialized                                                        ok
Validating and assigning resource manager                                     ok
****** STEP: sealevel_step ******
Setting up ZMQ queues                                                        n/a
All components created
Update: dummy.dummy.facts.dummy state: SCHEDULING
Update: dummy.dummy.facts.dummy.preprocess state: SCHEDULING
Update: dummy.dummy.facts.dummy.preprocess.task1 state: SCHEDULING
Update: dummy.dummy.facts.dummy.preprocess.task1 state: SCHEDULED
Update: dummy.dummy.facts.dummy.preprocess state: SCHEDULED
Update: dummy.dummy.facts.dummy.preprocess.task1 state: SUBMITTING
Update: dummy.dummy.facts.dummy.preprocess.task1 state: EXECUTED
Update: dummy.dummy.facts.dummy.preprocess.task1 state: DONE
Update: dummy.dummy.facts.dummy.preprocess state: DONE
Update: dummy.dummy.facts.dummy state: DONE
All components terminated

Here is another way to run the experiments (it is pretty helpful when debugging). Again from the opt directory run the following,

python3 runFACTS.py --shellscript experiments/dummy > mydummy.sh

the mydummy.sh script can be executed in two ways by running the entire script through bash or alternatively, you can manually execute each line of the script by copying the commands into your terminal one at a time. Executeing the sh script line by line can be helpful when debugging.

Hector-FACTS Experiments

This assumes that you have the Hector-FACTS up and running on a docker container.

python3 runFACTS.py experiments/hector.tlm.global

About

Repository for the Framework for Accessing Changes To Sea-level (FACTS) coupling with Hector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 57.7%
  • Python 35.7%
  • R 6.4%
  • Other 0.2%