Skip to content

Programming language resources

Bob Yantosca edited this page Jun 13, 2023 · 24 revisions

Fortran

Many numerically-intensive science applications (such as GEOS-Chem) are written in Fortran, which generates highly-optimized executables suitable for running on HPC installations. There are several Fortran compilers available, but we recommend the GNU Fortran (aka gfortran), which is open-source, and therefore suitable for running in cloud computing environments.

Python

We use GCPy and other Python code to analyze and visualize output from GEOS-Chem simulations. Python, which is open-source, contains many packages that are suitable for scientific applications.

Please also see our list of Python tools for GEOS-Chem.

Installing your own Python environments

By default mamba installs your packages in your home directory under ~/.conda. While a safe place to keep this data it is also very low performance due to filesystem latency. It also makes it hard to share your conda environments with other people on the cluster.

You can tell conda to install to a different location. We recommend using your holylabs directory space (e.g. /n/jacob_lab/Lab/seasfs01/Users/YOUR-USERNAME) as it should have very low latency. Follow these steps:

  1. Create the following directory:

    $ cd /n/jacob_lab/Lab/seasfs01/Users/YOUR-USERNAME
    $ mkdir -p mamba
  2. Add the following environment variables to your /.my_personal_settings or ~/.bash_aliases file (whichever one you have):

    # Specify installation path for Python packages and environments
    export CONDA_PREFIX="/n/jacob_lab/Lab/seasfs01/Users/YOUR-USERNAME/mamba"
    export CONDA_ENVS_PATH="${CONDA_PREFIX}/envs"
    export CONDA_PKGS_DIRS="${CONDA_PREFIX}/pkgs"
    
    # Specify where Python configurations will be stored 
    export XDG_CONFIG_HOME="${CONDA_PREFIX}/.config"
  3. Apply the changes by typing one of these commands:

    $ source ~/.my_personal_settings   # If you have a ~/.my_personal_settings file
    $ source ~/.bash_aliases           # If you have a ~/.bash_aliases file
  4. Create the environment. We recommend using a YAML configuration file (such as

    $ mamba env create -n ENV-NAME --file=CONFIG-FILE-NAME

    where ENV-NAME is the name of your Python environment and CONFIG-FILE-NAME is the name of a YAML file containing a list of packages to be installed).

  5. To activate the environment, type:

    $ conda activate env

and to deactivate the environment, type:

$ conda deactivate

Matlab

Group members: Feel free to add Need links here.

Clone this wiki locally