Experimenting with MITgcm

In our OceanDSL research project, we aim to produce Domain-Specific Languages (DSLs) for scientists and technicians to support and ease their work. We learned that through a set of interviews with them that every model uses special self-made tools and methods to configure, build and run models. This makes our effort complicated. Therefore, we need a model which is fairly simple to setup, but covers all typical steps in model setup. We choose MITgcm based on a recommendation of a collaborating scientist.

MITgcm is an earth model including ocean and atmosphere. Before we can use it as a case study in our model user and model developer scenarios, we need to make us familiar with the model.

As a first step, we aimed to play with the examples of the model. Therefore, we created a setup which can run directly on a Linux machine and one to be run in a docker container. We tested both setup with the tutorial examples of MITgcm. Based on the Barotropic Ocean Gyre we created an image of the result of the model run and a video showing intermediate results of the model in an animation.

The single images where generated using Octave (as a free Matlab replacement) and transformed into a video with Mencoder.

Barotropic tutorial model result for an rectangular ocean.
# Adjust the following path
addpath ADD-HERE-FULL-PATH-TO-THE-MITGCM-MATLAB-SCRIPTS

XC=rdmds('XC'); YC=rdmds('YC');
# Select a proper value. The start value is 0
Eta=rdmds('Eta',0);

contourf(XC/1000,YC/1000,Eta,[-.04:.01:.04]);
colorbar;
colormap((flipud(hot)));
set(gca,'XLim',[0 1200]);
set(gca,'YLim',[0 1200])

The script for the animation looks like this:

# Adjust the following path
addpath ADD-HERE-FULL-PATH-TO-THE-MITGCM-MATLAB-SCRIPTS
XC=rdmds('XC'); YC=rdmds('YC');

# The number of frames depend on your setup
for m = 0:60
  out=["out" num2str(m, "%04d") ".png"];
  # The multiplier depends on your setup
  Eta=rdmds('Eta',1296*m);

  hf = figure ("visible", "off");
  contourf(XC/1000,YC/1000,Eta,[-.04:.01:.04]);
  colorbar;
  colormap((flipud(hot)));
  set(gca,'XLim',[0 1200]);
  set(gca,'YLim',[0 1200]);
  print(hf, out, "-dpng "); 
endfor

Finally, the mencoder call looks like this:

mencoder mf://out????.png -mf fps=2:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi
Animation of the example model.

The setup is available at https://git.se.informatik.uni-kiel.de/oceandsl/case-study-mitgcm

A Distributed JPetStore

The MyBatis-JPetStore is a well known example application to demonstrate the stripes framework. It is a servlet-based web application which is widely used in academia to test and evaluate approaches. The preference for the JPetStore originates from its minimalistic design. Yet it is also functional complete, as it implements all typical aspects of a shopping system, including a catalog, a search function, a shopping cart, a customer management, and a sales and order management.

While the JPetStore is a neat application for software engineering purposes, it is not designed as a distributed system. Therefore, we recently forked the original JPetStore and created a distributed application out of it. You may find the distributed JPetStore in our github repository (https://github.com/research-iobserve/jpetstore-6).

We support three branches in this repository for different purposes:

  • distributed-with-presentation-layer contains the distributed version of the JPetStore without monitoring instrumentation
  • kieker-monitoring contains a version instrumented with Kieker monitoring probes
  • iobserve-monitoring contains a version instrumented with extended iObserve monitoring probes which also log request parameters

The current design of the distributed JPetStore is as follows:

Architecture and deployment of the distributed JPetStore

Architecture and deployment of the distributed JPetStore

The account service, the catalog service and the order service all contain their own database based on HSQLDB. These could be replaced by another database implementing JDBC. As the order and cart component share the database, they are deployed on the same service.

Our setup comes with proper Docker files for each service and a Docker Compose script to execute the complete shop system. You may find all sources and an introductory readme on github (https://github.com/research-iobserve/jpetstore-6).