Generalized Operator Modelling of the Ocean (GOMO) is a three-dimensional ocean model based on OpenArray which is a simple operator library for the decoupling of ocean modelling and parallel computing (Xiaomeng Huang et al, 2019). GOMO is a numerical solution model using finite differential algorithm to solve PDE equations. With MindSpore and GPU, we can achieve great improvements in solving those PDE equations compared with CPU.
This is an example of training GOMO Model with MindSpore on GPU.
The overall model architecture of GOMO is show below:link. The fundamental equations and algorithms of GOMO can also be found in this article
Dataset used: Seamount
Dataset size: 65x49x21
Data format:nc
Download the dataset
download the GOMO from Github and you can find the seamount dataset file in the
GOMO/bin/datadirectory.
After installing MindSpore via the official website, you can start training as follows:
# run distributed training example
sh run_distribute_train.sh [im] [jm] [kb] [step] [DATASET_PATH]
└── ocean_model
├── README.md # descriptions about ocean model GOMO
├── scripts
│ ├── run_distribute_train.sh # launch distributed training for GPU
├──src
│ ├── GOMO.py # GOMO model
│ ├── Grid.py # grid initial
│ ├── stencil.py # averaging and differential stencil oprator
│ ├── op_operator.py # averaging and differential kernel operator
│ ├── read_var.py # read variables from nc file
├── train.py # train script
sh run_distribute_train.sh [im] [jm] [kb] [step] [DATASET_PATH]
Training result will be stored in the current path, whose folder name begins with "train".
| Parameters | GPU |
|---|---|
| Resource | GPU(Tesla V100 SXM2),Memory 16G |
| uploaded Date | |
| MindSpore Version | |
| Dataset | Seamount |
| Training Parameters | step=10, im=65, km=49, kb=21 |
| Outputs | numpy file |
| Speed | 17 ms/step |
| Total time | 3 mins |
| Scripts | Link |
Please check the official homepage.