Skip to content

Lagrangian particle simulation

Jinbo Wang edited this page Apr 29, 2016 · 1 revision

###Lagrangian particle simulation

Steps to run:

The model is currently setup for the Southern Ocean State Estimate (SOSE). But it can be easily modified to fit a ny MITgcm output or any C-grid model output. To run the code, first make sure the model knows where to find your model output and correctly reads them.

  1. Edit the parameters in src/size.h to fit the data you have.
  2. Edit cpp_options.h to include or exclude features. Make sure isArgo is turned off in cpp_options.h: * #undef isArgo*
  3. Within src/ folder. Compile the code using

    make

You will get an executable file named O.particle.

  1. Prepare the initialization file using scritps/init_particl_xyz.py. Copy the binary file to src/.

  2. If you run particle with the SOSE 1/6th degree simulation, download necessary binary files:

    bash sync_data.sh

    otherwise, go to scripts folder and run

    python gen_data.py

    to generate the binary files.

  3. After running gen_data.py, you should get a list of binary files in your pth_data_out folder specified in data.nml including

  4. reflect_x.bin

  5. reflect_y.bin

  6. z_to_k_lookup_table.bin

  7. k_to_z_lookup_table.bin.

  8. Set parameters in the namelist file data.nml. The parameters are explained line by line in src/data.nml .explained.

  9. In the src/ folder, run the model

    ./O.particle

  10. Outputs are saved in the folder output_dir specified in data.nml.

Clone this wiki locally