SLURM Bash Scripts

These are examples of useful scripts for visualising output from ClimateMachine.jl

End-to-end modelling

Scripts

Demos

NB: these demos are based on the ClimateMachine.jl v0.2 release.

VizCLIMA

VizCLIMA contains Julia-based scripts for analysis of output from the ClimateMachine.jl. It can be used as part of the end-to-end pipeline, as shown above, or for stand-alone analysis of .nc output. Here are some examples:

  • General
    • file load & info print (.jl)
    • file splitting (.jl)
    • performance info table (.jl)
  • GCM
    • basic averaging and slicing(.jl, .ipynb)
    • differences between experiments (.jl, .ipynb)
    • 1D and 2D energy spectra (.jl, .ipynb)
    • animation: LES simple (.jl, .ipynb)
    • animation: multi-run GCM comparisons (.jl)
  • LES
    • vertical profiles (.jl)
    • 3D energy spectrum (.jl)

To apply a Julia script on ClimateMachine.jl output, and convert it into a Jupyter Notebook using Literate, run:

VIZCLIMA_HOME=<location-of-your-VizCLIMA.jl>
VIZCLIMA_SCRIPT=<your-VizCLIMA.jl-script>
CLIMA_ANALYSIS=<location-of-your-NetCDF-file(s)>

julia --project=$VIZCLIMA_HOME -e 'using Pkg; Pkg.instantiate(); Pkg.API.precompile()'
VIZCLIMA_LITERATE=$VIZCLIMA_HOME'/src/utils/make_literate.jl'
julia --project=$VIZCLIMA_HOME $VIZCLIMA_LITERATE --input-file $CLIMA_ANALYSIS/$VIZCLIMA_SCRIPT --output-dir $CLIMA_ANALYSIS

Tips

  • when analysing large data files, Jupyter Notebooks can be very slow, so the computation is recommended to be done using Julia scripts and on a compute node (e.g. hpc-89-24). For optimising your code in Julia see, for example, this tutorial.
  • use ncview for fast exploration of large GCM output when on Caltech Cluster

References