Contact: zeng  @  zegraph.com      Last update: 20 January 2010

METEX Library

METEX is a program I developed at the Centre for Global Environmental Research, Japan, for calculating air trajectory using several meteorological datasets. This library uses gSoap makes it METEX as a SOAP client. Please see METEX Guide for details of using the program.

Function Parameter Type Remark
metex([url]) strings Returns a METEX object. The optional parameter may be used to set the URL of a data server (e.g., 123.123.123.123:8080).
.add(x, y, z) numbers Adds a particle to METEX with the given longitude (deg-E), latitude (deg-N), and height (meter above surface).
.callback(fname) string Specifies a callback function to handle output. The function will be called with a string.
.clear()   Clears all particles in a METEX object.
.isentropic(flag) boolean Uses isentropic model (flag=true) or kinematic model (flag=false). The default is kinematic.
.output(fname) string Saves results to the specified file.
.start(mode, length, count, interval) integers Starts trajectory calculation in forward (mode>1) or backward (mode < 0) mode. The trajectory length is in hour; the count controls the number of times to run METEX; and the interval controls the next initialization time (current date and time plus hours of interval).
.utc(yy, mm, dd, hh) integers Sets initial year, month, day, and hour.

Example

// Load METEX library
load("metex.dll");

// Create object
mx = metex();

// Uncomment the following line to use isentropic model
//mx.isentropic(true);

// Specify the file for saving results
mx.output("trajectory.csv");

// Initialize year, month, day, and hour
mx.utc(2006, 7, 4, 3);

// Add a starting position (x-y-z or longitude-latitude-height) for a parcel.
// You can add as many parcels as you want.
mx.add(135, 30, 500);

// start calculation
mx.start(-1, 72, 1, 24);