Personal tools

MatLab Tools

From MohidWiki

Revision as of 10:27, 3 December 2008 by Guillaume (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a colletion of simple scripts to enable the analysis of MOHID's results in MatLab. Many of these are useful for code reference, for implementing your own scripts.

These tools are available to MOHID users and developers in the SourceSafe database "OtherTools/MatLab".

Scripts availiable

Basic scripts for opening and reading the contents of MOHID HDF5 files, there are the following scripts:

 * mh5grid.m : reads and outputs the Grid group from a file
 * mh5read.m : reads and outputs a specific dataset instant(or several) from a file
 * mh5info.m : reads and outputs some information on the file, as well as the number of instants.

For plotting MOHID HDF5 files, usually saving as png file:

 * mh5ts_plot.m : plots a timeserie of a property in model cell(i,j,z)
   * can plot a station timeserie and the model's for comparision(using waterbase_ts.mat)
   * can plot several properties in one plot using morewaterpropz
 * mh5xy_plot.m : plots an x-y graph at layer z for several instants within a file
   * can do a gif of the images generated
 * mh5zt_plot.m : plots a z-t graph, creating a vertical profile versus time graph.

Converting a netcdf file to a MOHID HDF5 file:

 * nc2mh5_convert.m

Model's timeserie analysis, for e.g., box files:

 * ts_BoxAnalyser.m : plots each box's properties versus time
 * ts_PhytoLimFactors.m : plots each box's phytoplankton limitation
 * ts_BoxFluxAnalyser.m : for reference, plots the fluxes between boxes. Can use a box image to plot arrows.

Extra scripts for plotting(may be usefull for code reference):

 * mh5strat_analyser.m : plots(x-y) the difference between two layers. 
        Usefull to check oxygen depletion or stratification.
 * mh5temp_comp.m : compares the temperature field with the assimilation temperature