MPAS-A Notes
Notes for Running MODEL FOR PREDICTION ACROSS SCALES - ATMOSPHERE, MIT EAPS, 2025
Notes for building everything MPAS from this tutorial.
Start:
0) Activate env & go to your run dir
source activate mpas_toolchain
cd /net/flood/data2/users/x_yan/mpas/MPAS-Model
1) Always remember to download input grids and files
Get the right mpas_static dir:
2) make -j4 gfortran CORE=init_atmosphere PRECISION=single AUTOCLEAN=true
1-1) Always set autoclean! # Good minimal incantation (equivalent to what worked) make -j$(nproc) gfortran CORE=init_atmosphere AUTOCLEAN=true
FC=mpif90 CC=mpicc CXX=mpicxx
FFLAGS=”-O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -mcmodel=large”
CFLAGS=”-O3 -mcmodel=large”
CXXFLAGS=”-O3 -mcmodel=large”
LDFLAGS=”-O3 -mcmodel=large”
2) make clean CORE=atmosphere
3) make -j4 gfortran CORE=atmosphere PRECISION=single
3-1) make -j$(nproc) gfortran CORE=atmosphere PRECISION=single
FC=mpif90 CC=mpicc CXX=mpicxx
FFLAGS=”-O3 -ffree-line-length-none -fconvert=big-endian -ffree-form -mcmodel=large”
CFLAGS=”-O3 -mcmodel=large”
CXXFLAGS=”-O3 -mcmodel=large”
LDFLAGS=”-O3 -mcmodel=large”
4) ./init_atmosphere_model
Takes a while!
5) mpiexec -n 32 ./atmosphere_model 6) ncl supercell.ncl 7) cd /net/flood/data2/users/x_yan/mpas/MPAS-Model/convert_mpas
export LD_LIBRARY_PATH=”$CONDA_PREFIX/lib:${LD_LIBRARY_PATH:-}”
chmod +x ./convert_mpas
./convert_mpas /net/flood/data2/users/x_yan/mpas/MPAS-Model/x1.10242.grid.nc /net/flood/data2/users/x_yan/mpas/MPAS-Model/diag.2010-10-28_00.00.00.nc
8) (mpas_toolchain) x_yan@dolma:/net/flood/data2/users/x_yan/mpas/MPAS-Model/convert_mpas$ ./convert_mpas /net/flood/data2/users/x_yan/mpas/MPAS-Model/x1.10242.grid.nc /net/flood/data2/users/x_yan/mpas/MPAS-Model/history.*.nc
Visualize
- cp /net/flood/data2/users/x_yan/mpas/mpas_tutorial_anamitra/ncl_scripts/plot_terrain.ncl .
- setenv FNAME x1.10242.static.nc
- ncl plot_terrain.ncl
Some One-Click Checks for Debuggings
1) Sanity env (same as before) ./smoke.sh download here
2) Run mpirun -n 1 ./init_atmosphere_model |& tee run.log
3) Quick skim for issues grep -E “Bootstrapping|filename template|CFSR|CRITICAL|ERROR” log.init_atmosphere.0000.out
4) Original Settings to namelist.init_atmosphere