ASML-YONSEI
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Getting started

Here are a couple of things that we need to do prior to the model experiments.

Installing MITgcm

Testing MITgcm

MITgcm includes a set of examples that can be run straight out of the box. For example, you can try to follow the documentation on barotropic gyre and see you can run the model without an issue.

configuring the system

  • go to tools/build_options
  • open linux_amd64_gfortran to edit
  • add the following line after the comments: MPI_HOME='/usr/lib/x86_64-linux-gnu/openmpi'.
  • you may refer to this file

compile

  • go to build directory
  • do ../../../tools/genmake2 -mods ../code -optfile ../../../tools/build_options/linux_amd64_gfortran -mpi
  • if it is finished without a severe error, do make depend
  • if it is finished without a severe error, do make
  • if you have mitgcmuv, then the compliation is successful

run

  • go to run directory
  • copy all input files to here: cp ../input/* .
  • create a sympolic link of the executable file to here: ln -s ../build/mitgcmuv .
  • then: ./mitgcmuv

python

miniconda

python can be a useful tool to analyze the results from MITgcm, and miniconda is one of the packages that allow you to run python. You can refer to its webpage for the installation of miniconda.

python package

The MITgcm example that we will do has an interesting grid structure. It is called cubed sphere where the Earth is expressed as a cube. Although it is a good approach that allows us to avoid the singularity issue, it requires an attention in reading the model output. In particular, we need to combine 6 faces of the cube to make a global map. So, we will get some help from the python package called cubedsphere

Once you have miniconda, you may try to set up cubedsphere in the terminal app. Here are the steps shown in its documentation

conda create -n mitgcm
conda activate mitgcm
conda install -c conda-forge cubedsphere
conda install python=3.9.12

And let’s do the followng line.

pip install git+https://github.com/MITgcm/xmitgcm.git

When you are done, you could deactivate mitgcm environment like this.

conda deactivate

JupyterLab

jupyterlab is a useful interface in running python.

In the terminal, do

jupyter lab

This will open the web browser and launch jupyterlab. If not, you may look for the url with localhost in the terminal, copy and paste to the web browser.

It consists of cells where you can do either coding, writing markdown, or just writing plain text. For more information, you can refer to its documentation.

There are other interfaces that you can do python coding. If you are familiar with one of them, you can use it!

Then, get this file.