A python package for analyzing MISOMIP1 and ISOMIP+ simulation results
If you don't already have an anaconda python environment:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
/bin/bash Miniconda3-latest-Linux-x86_64.shAt the end of the install procedure, it will ask you if it should add a line to
your .bashrc. Either do that or manually source the file it says to add to
your .bashrc.
Add the conda-forge channel and make sure packages come from there
whenever possible:
conda config --add channels conda-forge
conda config --set channel_priority strictCreate an env. for running the code:
conda create -n misomip -c conda-forge -c xylar python=3.8 misomip1analysisEither download the results from OSF or make local symlinks to your own ocean results. First, make a directory somewhere for the simulation results and the analysis
mkdir isomip+
cd isomip+Then, make one or more subdirectories for the model results:
mkdir POP2x
mkdir MPAS-Ocean
...These directories need to have the same model name that appears in the NetCDF file name:
COCO, FVCOM, MITgcm_BAS, MITgcm_JPL, MOM6, MOM6_SIGMA_ZSTAR,
MPAS-Ocean, NEMO-CNRS, NEMO-UKESM1is, POP2x, ROMSUTAS
If your files don't have the expected name, you can always make symlinks.
vim config.Ocean0_COMPut the following in the file:
[experiment]
## Options related to the experiment being analyzed
# The name of the experiment (one of Ocean0-4 or IceOcean1-2)
name = Ocean0
# The "setup" of the experiment (if any), either COM or TYP
setup = COM
[models]
## Options related to the models to analyze
# A comma-separated list of models whose results should be analyzed
names = POP2x, MPAS-OceanThere are many other config options that you can copy and modify.
For MISOMIP1 analysis, I have separated out the IceOcean1r and IceOcean1ra
experiments for all submitted results that didn't do this. If you are testing
your own results and just have IceOcean1 not separated into retreat and
readvance phases, you can give the experiment name simply as IceOcean1.
As you can see in the example config files, setup is one of COM_ocean or
COM_ice.
source ~/miniconda3/etc/profile.d/conda.sh
conda activate misomipSee misomip1analysis/config.default for all of the possible config options you can change.
vim config.Ocean0_COMExamples can be found in the configs directory in the GitHub repo.
misomip1analysis config.Ocean0_COMThe results will appear in the analysis folder
If you're ambitious and want to edit the code, this will get you started.
Clone from GitHub:
git clone git@github.com:xylar/misomip1analysis.git
cd misomip1analysisCreate an env. for running the code:
conda create -n misomip python=3.8 xarray dask netcdf4 numpy scipy \
matplotlib progressbar2 ffmpeg cmoceanMake a symlink to the inner misomip1analysis directory (in the same
directory as setup.py) where you have the results downloaded. Then, run
the analysis with something like:
python -m misomip1analysis config.Ocean0_COMwhere the config file is created in the same way as above.