Skip to content

A Shallow Water model with convective parameterization built on top of Oceananigans.jl

License

Notifications You must be signed in to change notification settings

aramirezreyes/RamirezReyes_ShallowWaterInFPlane

Repository files navigation

Parameterized convection on a shallow water model

Warning If you are a dissertation committee member you should be checking the arr_dissertation branch

This project implements the convective parameterization of:

Yang, D., and A. P. Ingersoll, 2013: Triggered Convection, Gravity Waves, and the MJO: A Shallow-Water Model. J. Atmos. Sci., 70, 2476–2486, https://doi.org/10.1175/JAS-D-12-0255.1.

On the Shallow Water model of Oceananigans.jl. It is currently supposed to work on GPU and CPU architecture.

It relies in:

It currently includes:

  • Coriolis (f-plane)
  • gravity
  • convection

This is experimental work carried out at the University of California Davis by Argel Ramírez Reyes

So far it has shown that convection aggregates in this Shallow Water Model with rotation (spontaneous TC genesis):

TCs

And without rotation

Aggregation

To reproduce this simulation (around 5 minutes in GPU and ~1hour with 32 cpu cores):

How to setup your environment

  1. First, download the julia language v1.7.1 from https://julialang.org/downloads/ Note: Ziwei Wang reports that the example script works on v1.7.2 which is the default julia installed in UChicago's Midawy computer.

  2. Clone this repository using git. From your bash session you can do:

    git clone https://github.com/aramirezreyes/RamirezReyes_ShallowWaterInFPlane --branch main --single-branch

    This should create a folder called RamirezReyes_ShallowWaterInFPlane

  3. cd into this folder

  4. launch julia from where you installed it:

    julia --project=@.
  5. Once you are in julia, press ] to enter package mode and type instantiate ]instantiate this will install the required julia packages. This step is only necessary the first time that you run it.

  6. Exit julia using CTRL+D or by exiting the package mode (backspace) and writing exit()

How to run an example

Assuming you are on the folder RamirezReyes_ShallowWaterInFPlane, use bash to launch julia in the following way:

/path/to/julia/bin/julia --project=@. -t 8 scripts/examples/convective_aggregation_cpu.jl

This runs the case found in scripts/examples/convective_aggregation_cpu.jl using 8 cores. Ideally you will run it in a bigger computer and you will be able to use 32 cores.

You can modify the parameters found in there in any text editor.

The output will be written in the folder called "data" in NetCDF format

If your system has a CUDA capable GPU, you can change the file in scripts/examples/convective_aggregation_cpu.jl and the code will run much faster

Parallel scaling

For a test run with domain of 500x500 saving the 8 variables every 100 timesteps with timestep of 5 seconds I observed the following performance for a 3 hour simulation. It is unimpressive but it gives an Idea about the scaling.:

Scaling

Apparently the optimum is with 32 cores (tested on NERSC Perlmutter)

About

A Shallow Water model with convective parameterization built on top of Oceananigans.jl

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published