Skip to content
Ning edited this page Feb 12, 2018 · 1 revision

dWaSSI-C model

This is the revised version of WaSSI-C model. The main revises include: 1 gridded simulation; 2 parallelized with OpenMP and MPI methods

The Struction of dWaSSI-C model

  1. GENERAL.f90

    This is the main script for the whole program.

  2. Subroutines:

    2.1 WARMUP.f90
    This subroutine is mainly used for reading data from input files and write some basic runnning information to ouput file.

    2.2 PET.f90
    It is used for simulating PAET(year,month) for the following simulation.(As PAET did not include grid information, We may be need to change it in the future.) There is no relevant in this matrix
    2.3 WATERBAL.f90
    This is the main file for data processing. It contants a day loop for the following simulation. The struction details can be found in the "Waterbal.png".( There is a bit differece between this framwork and the code, but the main calculation part is the same. The code does not have the K loop)"
    2.4 OUTPUT.f90
    This is used for summary the main results and write them to outputs files. It has two nested loops. (Year and month loop)

    2.5 SUMMARY.f90 This is similar to output file, but it only have year loop.

    2.6 CARBONBAL.f90 This is also for output.

Using MPI and OpenMP to run simulations

The dWaSSI-C model is currently running on Magnus in Pawsey (https://pawsey.org.au/).

Compile

It can be compiled in all Programming enviroments on Magnus; Cray, Intel or GNU. To run the makefile to compile with MPI support, using the following code:

FPPFLAGS='-DMPI' make VERBOSE=1  

This should produce an executable a.out which you can now run.

Run on Magnus

To run simply do the following either in a slurm sbatch script or in an interactive on a salloc session:

aprun -n NUMBER_OF_PARALLEL_TASKS ./a.out 1 PATH_TO_INPUT_DIRECTORY PATH_TO_OUTPUT_DIRECTORY

Input preparation

The input files must be in binary format without delimters or separators and must be of uniform datatype of real 4.

Two convenience applications have also been developed to convert input or output files in ASCII to the binary format acceptable by the MPI program. They are located in folder "Format_converter_programs/"

ascii2bin 
bin2ascii

To show the syntax or call arguments for each of the two, just type the name of executable and press return and it will show the list of the prototype or the possible arguments.