3. Tutorial ExamplesΒΆ
To proceed with the tutorial examples, user is expected to have completed the software
installation and data downloads from Section 1 (including
nctiles_climatology/
and m_map/
). The full suite of tutorial examples
can then be executed via gcmfaces_demo.m
by opening Matlab and typing
p = genpath('gcmfaces/'); addpath(p);
p = genpath('m_map/'); addpath(p);
gcmfaces_demo;
As prompted by gcmfaces_demo.m
, specify the desired amount of explanatory
text output. Various examples then proceed and display comments in
the Matlab or Octave command window. The Matlab GUI and debugger can also
be used to run each example line by line. This can be useful to learn more
about the inner workings of gcmfaces functions.
The first section in gcmfaces_demo.m
illustrates I/O and plotting
capabilities (grid_load.m
and example_display.m
). The second
section focuses on data processing capabilities such
as interpolation and smoothing.
example_interp.m
interpolates fields to a lat-lon grid and vice versa.
example_smooth.m
integrates a diffusion equation which involves tracer
gradient and flux convergence computations. The final section in
gcmfaces_demo.m
computes oceanic transports (example_transports.m
).